You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
List all currently configured remote repositories.
git push --all origin
Push all branches to your remote repository
Inspection & Comparison&Tags
Command
Description
git log
View changes
git log --summary
View changes (detailed)
git tag 1.0.0 [commitID]
You can use tagging to mark a significant changeset, such as a release
git push --tags origin
Push all tags to remote repository
View all the merge conflicts
Command
Description
git diff
View all the merge conflicts
git diff --base [filename]
View the conflicts against the base file
git diff [sourcebranch] [targetbranch]
Preview changes, before merging
git add [filename]
After you have manually resolved any conflicts, you mark the changed file
Undo local changes
Command
Description
git checkout -- [filename]
If you mess up, you can replace the changes in your working tree with the last content in head;Changes already added to the index, as well as new files, will be kept
git fetch origin
drop all your local changes and commits
git reset --hard origin/master
fetch the latest history from the server and point your local master branch at it, do this