![sublime merge git log sublime merge git log](https://i.stack.imgur.com/FluDL.png)
All of the git graphical interfaces are just running the above git commands. Now that you know how git works from the command line, you are ready to start using git within a graphical interface. So they are backed up to a remote repository (.git folder) (10) git push : Push versions that are saved in the local repository (.git folder) (9) git rm FILENAME : Remove the file `FILENAME` from the working directory (it still exists (8) git mv OLD NEW : Rename a file from name `OLD` to name `NEW`. You may need to use `q` to exitįrom the text viewer if there are a lot of versions to print. (7) git log : Print a log of the versions in the repository. The last saved version in the repository. If `VERSION` is `main`, then return the working directory to (6b) git checkout VERSION : Tell git to change the working directory back to a specific `VERSION` Restore the last version of `FILENAME` that was saved (6a) git checkout VERSION FILENAME : Tell git to bring `VERSION` version of `FILENAME` into theĬurrent working directory.
![sublime merge git log sublime merge git log](http://acmeextension.com/wp-content/uploads/2017/09/caiuse-sublime-300x141.png)
`git diff FILENAME` to limit to only the file `FILENAME` Show the differences for all tracked files. (5) git diff : Tell git to show the differences between the files in the workingĭirectory and the last saved version in the git repository. You canĬommit new versions of individual files if you want, but this (4) git commit -a : Tell git to save a new snapshot version of all of the trackedįiles in the directory. `git add README.md` will tell git to track `README.md` (3) git add : Tell git to start monitoring (tracking) the versions of a newįile, e.g. (2) git status : Tell git to print the status of the files in the version (1) git init : Tell git to start version controlling the files in a directory Here's the completed cheat sheet, which you can refer back to at any time. Congratulations - you've now learned enough to start using git to version control your files and back them up to a secure location.Īs promised, there was only a small number (just 10!) git commands that you needed to learn to become proficient in git.