Confirmed users
1,643
edits
| Line 400: | Line 400: | ||
|    Switched to branch 'new_branch'   |    Switched to branch 'new_branch'   | ||
| What exactly "conflict" means here is still unclear  | What exactly "conflict" means here is still unclear to me. TBD. | ||
| How to  | How to resolve aborting? Different strategies for different situations | ||
| # Force checkout: if you don't change lose at all, submit "git checkout -f <branch>" bravely. | # Force checkout: if you don't change lose at all, submit "git checkout -f <branch>" bravely. | ||
| # Hard reset to HEAD: almost the same with previous one. Hard reset and checkout again. | # Hard reset to HEAD: almost the same with previous one. Hard reset and checkout again. | ||
| # git-merge --merge: If you want to bring what you change in working directory into new branch, choose this one. With --merge option, a three-way merge between the current branch, your working directory, and the new branch is done, and you will be on the new branch. And for sure, you have to fix conflicts if any on the new branch. | |||
| # Commit change: keep everything you change into object store by a new commit, then checkout again | # Commit change: keep everything you change into object store by a new commit, then checkout again | ||
| # Stash: you need to rush into another branch to fix emergency thing. You don't want to commit you change in the current branch without more analysis. Use git stash. | # Stash: you need to rush into another branch to fix emergency thing. You don't want to commit you change in the current branch without more analysis. Use git stash. | ||