-
-
Save ianfinch/4e850f0682685a269242b7e4418e9574 to your computer and use it in GitHub Desktop.
Reminder of git commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
See all remotes ....................... git remote -v | |
Fetch a specific remote ............... git fetch <remote name> | |
Compare remote with local files ....... git diff --name-only remotes/<remote name>/master | |
Compare remote with main repo ......... git diff --name-only master remotes/<remote name>/master | |
Squash commits ........................ git rebase -i <after this commit> | |
Squash commits into initial commit .... git rebase -i --root | |
Force submit after squashes ........... git push origin +master | |
Replace "pick" with "reword" to change the commit message | |
Replace "pick" with "squash" to combine a commit with the last "pick" commit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment