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
git remote set-url origin [email protected]:XXX/YYY.git # user / repo name
git push -u origin master
Changes
git pull # if it has been changed from other computer
git pull origin master # or this
git status # View changes to commit
git add -A # Add new files and remove removed files
git commit -a -m 'XXX' # commit message, include -a if a file have been modified
git push # upload/submit
Conflict
git mergetool
Branch
git branch # list all branch (local)
git branch -a # list all branch (remote and local)
git branch XXX # create branch
git branch -d XXX # delete local
git push origin :XXX # delete remote
git checkout XXX # switch branch
git checkout -b XXX YYY # Download Remote (YYY) to local (XXX)
Rename branch
git branch YYY/XXX # new name (YYY), old name (XXX)
git push origin YYY
git push origin :XXX
Tags
git tag -a v1.0 -m 'message'
git push origin master --tags # push tags
git tag -d v1.0 # delete local
git push origin :refs/tags/v1.0 # delete remote
Fork
git clone [email protected]:XXX/YYY.git # user / rep name
git push origin master