branching-and-merging

My git branch is showing 'origin/master' and 'origin/HEAD' in Sourcetree and I don't know how to merge the two

♀尐吖头ヾ 提交于 2020-01-01 07:41:27
问题 I recently merged a branch I was working on with the 'master' branch. I must have (still kind of a git n00b) done something when pushing or pulling that created both an origin/master and an origin/HEAD branches. Unfortunately, I didn't keep a record of what commands I ran that did this. Currently, my team has a bunch of code in their master copies that I'm not getting when I check out the project (even if I clone to a new location). Here's a screenshot of what Sourcetree is showing: I really

My git branch is showing 'origin/master' and 'origin/HEAD' in Sourcetree and I don't know how to merge the two

余生颓废 提交于 2020-01-01 07:41:14
问题 I recently merged a branch I was working on with the 'master' branch. I must have (still kind of a git n00b) done something when pushing or pulling that created both an origin/master and an origin/HEAD branches. Unfortunately, I didn't keep a record of what commands I ran that did this. Currently, my team has a bunch of code in their master copies that I'm not getting when I check out the project (even if I clone to a new location). Here's a screenshot of what Sourcetree is showing: I really

How can I branch my code in a way that makes testing possible without contaminating the baseline?

狂风中的少年 提交于 2020-01-01 07:08:33
问题 Using TFS, we have the following: A main baseline A development branch for each development effort. These get merged back to the baseline. A release branch that is created with each release. Bug fixes are made here, released, and merged back to the baseline. Using shelvesets, we can share code across development branches if needed without contaminating the baseline. Useful for code reviews. When we deliver our development changes to baseline we have an automated build that kicks off and

Find the latest merge point of two branches

≯℡__Kan透↙ 提交于 2019-12-31 08:57:48
问题 Having two branches, how can I find the latest revision(s) where the two branches were merged? Is there a standard Mercurial command to do that? This is the same as question How to find the common ancestor of two branches in SVN? , but for Mercurial instead of subversion. I didn't understand why Lazy Badger's answer was the right one, so I had to make a little drawing, and now I get it: When two branches are merged, they are not really "merged", but the changes from one branch are integrated

Merges between two branches in two directions - any good reason or completely forbid?

一世执手 提交于 2019-12-31 03:53:28
问题 My colleague recently ask me to help him with precommit hook which block push to central repo. This is famous https://hg.python.org/hooks/file/tip/checkheads.py Algorithm of checkheads.py gather heads in branch ignoring changes from another branches by piece: for x in xrange(p + 1, end): if repo[x].branch() != branch: continue History contains merges from default to prod and then back from prod to default . So checkheads.py didn't find that changesets merged at default (connected in graph)

Finding where source has branched from git

匆匆过客 提交于 2019-12-30 06:18:06
问题 I have a git repository (covering more or less project history) and separate sources (just a tarball with few files) which have forked some time ago (actually somewhere in 2004 or 2005). The sources from tarball have undergone quite a lot of changes from which I'd like to incorporate some. Now the question is - how to find out what was actually the branch point for the changed sources to get minimal diff of what has happened there. So what I basically want is to find place in git history,

Migrate SVN to git with cleanup

旧巷老猫 提交于 2019-12-25 07:58:07
问题 I want to migrate my project from SVN to git but I would like to have a clean history of all files and basically get rid of branches. A few of the issues I have: Some modules (subdirectories) where created, worked on and later discarded. I don't want them in my history. Some code was developed at different places in the repository (not a branch of this project) and then svn copy'ed. i.e. /otherproject/trunk/foo was incorporated into /myproject/trunk/bar. It should look like it was developed

Is it okay to merge individual files from one branch to another?

断了今生、忘了曾经 提交于 2019-12-25 05:33:12
问题 I have a three branch setup in TFS, DEV, PRE, and PROD. My team wants to merge individual files from DEV to PRE, so the code can enter test as they complete it. However, I've heard this is not a good idea, and that if we need to do that, we need to be using a feature branch setup. Does anyone have any recommendations on if we should or shouldn't be doing the merging at that fine level (and then when ready to move to production, we'd migrate the entire branch). 回答1: You would typically want to

Is it okay to merge individual files from one branch to another?

笑着哭i 提交于 2019-12-25 05:33:09
问题 I have a three branch setup in TFS, DEV, PRE, and PROD. My team wants to merge individual files from DEV to PRE, so the code can enter test as they complete it. However, I've heard this is not a good idea, and that if we need to do that, we need to be using a feature branch setup. Does anyone have any recommendations on if we should or shouldn't be doing the merging at that fine level (and then when ready to move to production, we'd migrate the entire branch). 回答1: You would typically want to

git-svn commits to wrong branch / how to merge svn branch via git-svn

試著忘記壹切 提交于 2019-12-24 09:27:28
问题 I have a SVN repository which I checked out with git-svn, using the --stdlayout option (at that time, the repo was empty). I then worked on the master branch for a while. When using git svn dcommit , it would svn-commit my changes to https://my.host/repo/trunk like it should. At some point I created a branch named "arithmetics" with git. Later I wanted to create that branch in svn too, so I did a git svn branch arithmetics and then a git branch --set-upstream arithmetics remotes/arithmetics