Skip to content

Instantly share code, notes, and snippets.

@khangvan
Last active October 31, 2019 12:58
Show Gist options
  • Save khangvan/26cef891cfd205597def765184b5375f to your computer and use it in GitHub Desktop.
Save khangvan/26cef891cfd205597def765184b5375f to your computer and use it in GitHub Desktop.
git status #
git add . #
git commit -m my_comment
#cach 1
git fetch origin # download remote to local, but not touch to my workspace
git diff master origin/master # check what missing from workspace compare to remote
git log origin/master ^master #show log compare new from remote
git merge master/origin
#cach 2 #you sure local is old one then you merge all from remote to local and even workspace.
git pull origin master # origin =>master
git push origin master # master > orgigin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment