From c1e7d3d485051d0f9ae032de1e22f97cd24ccbe6 Mon Sep 17 00:00:00 2001 From: Alex Grin Date: Wed, 19 Jul 2017 18:52:33 -0400 Subject: [PATCH] Updated Branching and Merging (markdown) --- Branching-and-Merging.md | 3 +++ 1 file changed, 3 insertions(+) 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