Last active
December 15, 2015 21:58
-
-
Save haio/5329095 to your computer and use it in GitHub Desktop.
Git WorkFlow
This file contains hidden or 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
clone: | |
git clone git@gitserver:project_name [local_name] | |
local branch: | |
git checkout -b branch_name | |
git merge --squash branch_name | |
git pull remote_name branch_name (git pull origin master default) | |
git push | |
git branch -D branch_name | |
remote branch | |
git branch -a branch_name | |
git push remote_name branch_name:remote_branch_name (git will auto create a remote branch when push) | |
git checkout -b branch_name upstream(remote_name)/branch_name | |
git pull remote_name branch_name | |
git push remote_name branch_name OR git push remote_name local_branch_name:remote_branch_name | |
delete remote_branch: | |
git push remote_name :remote_branch_name (delete ) | |
git branch -D branch_name | |
init from empty: | |
git init | |
git remote add origin git_url | |
git remote update | |
git checkout -b brach_name remote_name/remote_branch_name | |
git pull origin branch_name | |
git push origin branch_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment