Git/hacks: Difference between revisions

more log and branch examples
correct errant instructions that would leave a branch with the same commit SHA as the copy it came from
Line 23: Line 23:


Checkout a specific branch from origin, and track it.
Checkout a specific branch from origin, and track it.
What if you enter <code>git checkout -b REL1_29</code> when you *should have entered* <code>git checkout -b REL1_29 origin/REL1_29</code>? Just tell git that you meant to track the branch in origin: <code>git branch --set-upstream-to=origin/REL1_29 REL1_29</code>
What if you enter <code>git checkout -b REL1_29</code> when you *should have entered* <code>git checkout -b REL1_29 origin/REL1_29</code>? J<s>ust tell git that you meant to track the branch in origin: <code>git branch --set-upstream-to=origin/REL1_29 REL1_29</code></s>  Set upstream doesn't do what's intended here! You should delete the branch that you created as a 'copy'; and then checkout the branch correctly.


== Tracing in Status ==
== Tracing in Status ==