I like option 2 as I don't need to checkout dev, but both options are equally correct. This is OK, since b isn't working on dev, (s)he's working on feature_branch. In this scenario b's local feature_branch will have the most recent changes from dev as they are on the remote repo and their local dev will not have these changes. git merge origin/dev - this merges changes from the downloaded version of dev to the feature_branch.git fetch origin dev - this downloads latest changes to dev, but doesn't merge them to local dev.With this option b's both local dev and feature_branch have latest changes. git fetch -depth 1 origin tags/v1.6.0 It becomes very fast to switch tags/branch this way. git clone :apache/spark.git -branch master -single-branch -depth 1 Update to specific tag. Heres an example using Spark master branch and latest tag: Initial clone. git merge dev - this merges changes from b's local dev to the feature_branch. If you can select a specific branch, it can be even faster.This operation should normally be a 'fast-forward' (so no merge conflicts) git pull - this fetches (downloads) the changes onto computer b and merges these changes into the currently checked out local branch on computer b (in this case branch dev).Commit all changes to branch feature_branch (git status shows clean). This is so that person B works on latest code and their eventual merge to dev is easy. I have assumed the name of the remote repository as origin here, you can substitute it with the actual name. git remote update git checkout git pull origin .It's a good practice to as soon as feasible after person A pushes the changes to dev for person B to get these changes into their branch b. They can just pull from the remote repository to get the HEAD of the remote branch.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |