Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. for avoiding conflict branches in the future, you should make checkout to master first, make a new branch, then you ca check out to it.
  2. ```bash
  3. git checkout master
  4. git branch <new-branch> #name it as you wish
  5. git checkout <new-branch>
  6. ```
  7. Or you could possibly as a shortcut do this by one command
  8. ```bash
  9. git checkout master
  10. # `-b` option will make a new branch and it will switch to it.
  11. git checkout -b <new-branch> #name it as you wish
  12. ```
  13. Or even shorter, with online you could do it as:
  14. ```bash
  15. # `-b` option will make a new branch and it will switch to it.
  16. # new-branch it could be `week2` and source-branch could be `master` in your case because we need to checkout from the master branch.
  17. git checkout -b <new-branch> <source-branch>
  18. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement