Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
development:git:start [2020/03/19 13:00]
kalenpw created
development:git:start [2021/07/01 10:24] (current)
kalenpw
Line 5: Line 5:
 ---- ----
 ===== Branches and Merging ===== ===== Branches and Merging =====
-  - ''git checkout -b development'' or whatever your branch name is+  - ''git checkout -b new-branch'' or whatever your branch name is
   - make your changes in development branch   - make your changes in development branch
   - ''git add .''   - ''git add .''
   - ''git commit -m "developed feature x"''   - ''git commit -m "developed feature x"''
-  - ''git push origin development'' +  - ''git push origin new-branch'' 
-  - when ready to merge, still on dev branch+  - when ready to merge, still on new-branch
   - ''git merge master'' should be clean, but gives you an opportunity to fix it   - ''git merge master'' should be clean, but gives you an opportunity to fix it
   - ''git checkout master'' should be clean again since we did above fix   - ''git checkout master'' should be clean again since we did above fix
-  - ''git merge development %%--%%no-ff''+  - ''git merge new-branch %%--%%no-ff''
   - ''git push''   - ''git push''
 +
 +----
 +===== Replace one branch with another =====
 +Useful if working on complete overhauls in a separate branch
 +<code bash>
 +git checkout better_branch
 +git merge --strategy=ours master 
 +git checkout master
 +git merge better_branch 
 +</code>
  
 ---- ----
Line 34: Line 44:
 git remote set-url origin git@github.com:kalenpw/repo.git git remote set-url origin git@github.com:kalenpw/repo.git
 </code> </code>
 +----