bit is a version control system inspired by Git. The main inspiration came from 'Pro Git', a book by Scott Chacon (one of the co-founders of GitHub). The 'internals' section of the book provided insightful information about the internal workings of Git and has been a deciding factor in the development of the core workings of Bit.
-
init
initialize a directory as bit directory
bit init .
-
status
check the status of current working directory and staging area
bit status
-
add
add files, changes to staging area inorder to make them ready to commit
to select all the files
bit add .
for single files
bit add <filename>
-
rm
--cached is used to remove from just staging area
bit rm --cached .
to select single files
bit rm --cached <filename>
to remove from both staging area and working directory use the following command
bit rm <filename>
-
Restore
restore the file from staging area to working directory
bit restore --staged <filename>
restore the file changes from previous commit descarding the current changes
bit restore <filename>
-
commit
commit the files in staging area
bit commit -m "<COMMIT_MSG>"
-
branch
create a branch
bit branch <BRANCH_NAME>
view branches or view active branch
bit branch -a
-
checkout
switch between branches
bit checkout <BRANCH_NAME>
Following information provides just a bird's eye view of how commands are working and it is a bit simplified inorder to make it easy to understand.