Merge

0

Fast Forward Merge

  • when you just have a simple branch from the master tip
# Start a new feature
git checkout -b new-feature master
# Edit some files
git add <file>
git commit -m "Start a feature"
# Edit some files
git add <file>
git commit -m "Finish a feature"
# Merge in the new-feature branch
git checkout master
git merge new-feature
git branch -d new-feature

3-way merge

  • basically any merge that's not a simple fast forward
#Start a new feature
git checkout -b new-feature master
# Edit some files
git add <file>
git commit -m "Start a feature"
# Edit some files
git add <file>
git commit -m "Finish a feature"
# Develop the master branch
git checkout master
# Edit some files
git add <file>
git commit -m "Make some super-stable changes to master"
# Merge in the new-feature branch
git merge new-feature
git branch -d new-feature

https://www.atlassian.com/git/tutorials/using-branches/git-merge

  • 0 posts
  • 0 subtopics
  • 6 days ago by vince