branching-and-merging

Finding merge candidates in TFS

我怕爱的太早我们不能终老 提交于 2019-11-30 09:26:28
问题 I have two branches for my code. Lets say B1 and B2 . Code changes happen on both the branches parallely and we do a periodic merges (not everything, only necessary things) from B1 to B2 . However, this merge is done manually (for whatever reason) by copy pasting the code from one branch to another. Now, I want to make sure that all the necessary things are merged from B1 to B2 . Note that the files in B2 branch may contain additional changes other than coming from B1 . I tried using tfs

Are merges in Git symmetric?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 06:28:59
问题 Lets say we have two branches ( B and C ) that have diverged from a common ancestor A . Will merging from B to C produce the same result as merging from C to B ? A | / \ B C To clarify- I'm assuming that any manual merge conflict resolutions will occur in both directions. But will any automatic merges that occur result in the same code being chosen? This is what I'm assuming, since the commit dates are identical in both directions. To further clarify - I know that the actual merging results

Show only history of one branch in a Git log

允我心安 提交于 2019-11-30 05:58:08
I am using Git for my project and trying to follow best practice: I work on a topic branch When ready, I merge the topic branch into my dev branch using git merge --squash . This keeps my dev branch clean. Whenever the dev branch is stable and the team decides it's time for a release, we merge the dev branch into the master branch, without using squash, and tag that commit as a version release. This should keep our history, and using gitk, we can see where all of the commits come in. However, I want to be able to see only the commits applied to the master branch. I have tried: git log master

git - branch alias?

孤街醉人 提交于 2019-11-30 04:15:19
I am researching switching from starteam to git. Currently, in starteam, we use "floating views" with special names. These floating views basically work like aliases. Therefore, we can specify a specific alias to checkout from and we'll get the branch that we're currently model testing. How would this be done in git? This is basically how our branches are organized: These are all branches master (stable view) | - Branch 2012.05.01 | | - Project 1 | | - Project 2 | | - model [floating view / alias to Branch 2012.05.01] | | - Branch 2012.07.11 (these would also have various child views for

Remove a Branching Relationship in TFS 2010

馋奶兔 提交于 2019-11-30 03:04:28
问题 I have a TFS 2010 Team Project that I've just taken over. The branching hierarchy is Dev is a child of Test, Test is a child of Main e.g. Main ----Test --------Dev However at some point in the past someone has done a baseless merge between Dev and Main. this is causing a great deal of confusion as Developers are now accidentally merging code directly from Dev to Main. This is causing pain with unforeseen merge conflicts when code follows the correct process and is merged from Test to Main, as

Should I delete a branch after merging it?

陌路散爱 提交于 2019-11-30 01:39:31
After merging a branch, do you delete it from the repository? However, it's a good practice or not? I usually create a lot of branches, since I don't want to break my current release, and I'd wish to delete them to keep things in order. However, if you work with Assembla or GitHub, your merge requests from old branches will be saved on the site, so if you delete them you'll get an error since it won't be able to fetch them... Usually how do manage that? There's no problem in deleting branches that have been merged in. All the commits are still available in the history, and even in the GitHub

Why does git merge a branch into itself?

这一生的挚爱 提交于 2019-11-30 01:38:30
I awoke this morning and looked at the commit history of one of my dev team's private repositories on BitBucket. I saw this: Anonymous committed fcde879 MERGE Merge branch 'develop' of https://bitbucket.org/abc/xyz into develop This is, uh, somewhat unusual. My guess was that this was pushed from a new machine that didn't have git configured properly. Still, I was not sure why it was doing this. On BitBucket, it shows two separate hashes as the commit parents, but it does not have the "view raw commit" option of other commits. I checked out that branch, pulled, and looked at the log manually.

Finding merge candidates in TFS

此生再无相见时 提交于 2019-11-29 16:06:04
I have two branches for my code. Lets say B1 and B2 . Code changes happen on both the branches parallely and we do a periodic merges (not everything, only necessary things) from B1 to B2 . However, this merge is done manually (for whatever reason) by copy pasting the code from one branch to another. Now, I want to make sure that all the necessary things are merged from B1 to B2 . Note that the files in B2 branch may contain additional changes other than coming from B1 . I tried using tfs merge /candidates ... command hoping that it will file comparison (may be using diff tool) and give the

Prevent merging a file from master with Git

故事扮演 提交于 2019-11-29 15:15:30
问题 In another question it is recommended to use .gitattributes in order to keep the file tracked but not merged in different branch, but my use case below seems not working.. mkdir git cd git git init echo "B" > b.txt git add b.txt git commit -m 'Initial commit' echo "b.txt merge=keepMine" > .gitattributes git add .gitattributes git config merge.keepMine.name "always keep mine during merge" git config merge.keepMine.driver "keepMine.sh %O %A %B" git commit -m 'Ignore b.txt' git checkout -b test

Show only history of one branch in a Git log

六眼飞鱼酱① 提交于 2019-11-29 05:21:35
问题 I am using Git for my project and trying to follow best practice: I work on a topic branch When ready, I merge the topic branch into my dev branch using git merge --squash . This keeps my dev branch clean. Whenever the dev branch is stable and the team decides it's time for a release, we merge the dev branch into the master branch, without using squash, and tag that commit as a version release. This should keep our history, and using gitk, we can see where all of the commits come in. However,