![]() ![]() 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. Create a new dev branch: git checkout -b dev. git commit -m 'added feature X' git push origin featureX. Add the remote repository: git remote add origin /path/to/project.git. git checkout dev git pull origin dev git checkout featureX git pull from dev to featureX (i dont even know what this command looks like) git add. 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. Change to your dev folder and initialize a git repository there: cd dev git init. git merge origin/dev - this merges changes from the downloaded version of dev to the feature_branch.When you need to make further changes to develop, cut new branches in a similar fashion while develop is checked out: git checkout -b feature. From your web browser, open the team project for your Azure DevOps organization, and then choose Repos > Branches to open the Branches view. Then cut a branch called develop: git checkout -b develop. git fetch origin dev - this downloads latest changes to dev, but doesn't merge them to local dev First, checkout your master branch: git checkout master. ![]() With this option b's both local dev and feature_branch have latest changes. ![]() git merge dev - this merges changes from b's local dev to the feature_branch.This operation should normally be a 'fast-forward' (so no merge conflicts) Tom Hale at 10:15 (Nitpick) I think you're having the wrong links for the 'question differentiation' section. 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). 40.4k 33 185 240 3 Reopen queue reviewers: you may wish to read the meta.so discussion of this question here.In the ensuing New Branch dialog, specify a name for the branch. Commit all changes to branch feature_branch (git status shows clean) For the developing of new features, it is better to create a new branch, lets name it as 'dev' branch, and make a clone or switch to the dev branch using the following command: git checkout -b dev Now, if you want to develop a feature then create a new branch on dev and start working. Right-click within the Local branches list and choose Create Branch from the context menu.This is so that person B works on latest code and their eventual merge to dev is easy. 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. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |