diff --git a/Branching-and-Merging.md b/Branching-and-Merging.md index 75ba469..38d4219 100644 --- a/Branching-and-Merging.md +++ b/Branching-and-Merging.md @@ -12,6 +12,7 @@ git checkout -b new_branch origin/master This reduces merge conflicts in the future. ``` +# on your_branch_name git fetch git rebase origin/master ``` @@ -21,6 +22,7 @@ git rebase origin/master When working locally, do whatever you want. Before sharing, clean up your history into logical commits and write good commit messages for them. Focus on clarity for someone reading this 3 months from now. ``` +# on your_branch_name git fetch git rebase -i origin/master git push -u origin your_branch_name @@ -34,6 +36,7 @@ git push -u origin your_branch_name We want a merge commit present for all code merged from PRs, even if that PR is properly rebased and only a single commit. The merge commit documents that the merge came from a PR. This helps us differentiate between commits to straight master. ``` +# on your_branch_name git fetch git rebase origin/master git checkout master