Created Branching / Merging (markdown)
parent
d07bab6fb8
commit
9543a9f647
1 changed files with 33 additions and 0 deletions
33
Branching---Merging.md
Normal file
33
Branching---Merging.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
## Start all work in a new branch off of master
|
||||
|
||||
```
|
||||
git fetch
|
||||
git checkout -b new_branch origin/master
|
||||
```
|
||||
|
||||
## Rebase onto master daily
|
||||
|
||||
This reduces merge conflicts in the future
|
||||
|
||||
```
|
||||
git fetch
|
||||
git rebase origin/master
|
||||
```
|
||||
|
||||
## Clean up your commits before creating a PR
|
||||
|
||||
```
|
||||
git fetch
|
||||
git rebase -i origin/master
|
||||
git push -u origin your_branch_name
|
||||
```
|
||||
|
||||
## Rebase and non-ff-merge into master when you're done
|
||||
|
||||
```
|
||||
git fetch
|
||||
git rebase origin/master
|
||||
git checkout master
|
||||
git pull
|
||||
git merge --no-ff your_branch_name
|
||||
```
|
Loading…
Add table
Reference in a new issue