- Do work on a web site.
- Create a branch for a new story (iss53) you’re working on.
git checkout -b iss53
- Do some work in that branch.
git commit -a -m
'added a new footer [issue 53 comment]'
At this stage, you’ll receive a call that another issue is critical and you need a hotfix. You’ll do the following:
- Switch to your production branch.
git checkout master
- Create a branch to add the hotfix.
git checkout -b hotfix
- After it’s tested, merge the hotfix branch, and push to production.
git commit -a -m
'fixed the broken email address'
$
git checkout master ( 要先切回目的地)$
git merge hotfix- Switch back to your original story and continue working.
git checkout master
git merge iss53
Merge Conflict:
git status
衝突的檔案會留著,檔案內衝突的部分用====分野
Reference link.
Git svn
git log 查hash code
git branch branch_name hash_code
git checkout hash_code
git checkout -b $branch_name $hash_code
git stash
git checkout -b new_branch
git stash pop
git list-files
Git svn
git log 查hash code
git branch branch_name hash_code
git checkout hash_code
git checkout -b $branch_name $hash_code
git stash
git checkout -b new_branch
git stash pop
git list-files
No comments:
Post a Comment