branching-and-merging

git tells me that I Merge conflict, but also tells me that no files need merging

为君一笑 提交于 2019-11-29 03:56:19
I committed some changes in the branch new . I checkout out to master . When I tried to merge: $ git merge new Auto-merging js/site.js CONFLICT (content): Merge conflict in js/site.js Automatic merge failed; fix conflicts and then commit the result. So I installed kdiff3 and configured my config files and when I tried to use mergetools I got: $ git mergetool kdiff3 No files need merging I ran a diff and it outputted this: diff --cc js/site.js index 8c17d62,7955b13..0000000 --- a/js/site.js +++ b/js/site.js @@@ -72,4 -81,18 +81,22 @@@ function doSmallScreen() $(document).ready(function () {

How do I get the SCM URL inside a Jenkins Pipeline or Multibranch Pipeline?

混江龙づ霸主 提交于 2019-11-29 01:45:21
I am trying to get a prebuild merge to work inside a multibranch pipeline and I would like to avoid having to hardcode the git url in my pipeline script. It seems like scm step must store the url somehow, but I cannot figure out how to access it. You are correct, the scm object does have the information you need. When using git as the source control in a Pipeline project (or Multibranch Pipeline project), the scm global variable will be an instance of GitSCM . That means that `scm.getUserRemoteConfigs()' will return a list of UserRemoteConfig instances. Those instances have the git remote's

git - branch alias?

旧时模样 提交于 2019-11-29 01:33:06
问题 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 /

Merging one change to multiple branches in Git

*爱你&永不变心* 提交于 2019-11-28 22:41:50
I am used to having one main branch (master) and working in topic branches. But I'm working on a project now with two main branches (master and experimental) and I am unsure how to best merge my topic branch into both? Is this the right way to do it? If not can someone let me know the right way. (master)$ git checkout -b bugfix # do bug fix here (bugfix)$ git commit -a -m 'Fixed bug.' (bugfix)$ git checkout master (master)$ git merge bugfix (master)$ git checkout bugfix (bugfix)$ git rebase experimental (bugfix)$ git checkout experimental (experimental)$ git merge bugfix Thank you. Don't do

Should I delete a branch after merging it?

天大地大妈咪最大 提交于 2019-11-28 21:47:03
问题 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? 回答1: There's no problem in deleting

How should Git Flow work with QA testing both a release and a new feature?

▼魔方 西西 提交于 2019-11-28 21:12:36
问题 We are using Git Flow on our latest iOS project and I am trying to work out a way of working with QA so that they can test the latest release, as well as testing a new feature, without having to worry about which bugs were fixed in which branch. At present, they have been testing on the release/v1.0.1 branch, which has several bugs fixed from the original release/v1.0 . Concurrently, I have been working on a new feature which has been planned for the v1.1 release, but was branched off from

Why does git merge a branch into itself?

自闭症网瘾萝莉.ら 提交于 2019-11-28 21:02:58
问题 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

Are merges in Git symmetric?

久未见 提交于 2019-11-28 19:09:10
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 in "mirror images" of each other based on the direction. I'm just asking about the automatically

Deleting an SVN branch

社会主义新天地 提交于 2019-11-28 16:22:33
问题 I created a branch of an SVN project called 'features', and now whenever I try to update said project, it brings with it a features folder, which contains another copy of the project from the branch. Is there a way to remove the branch from the repository completely so that this doesn't happen any more? 回答1: Sure: svn rm the unwanted folder, and commit. To avoid this situation in the future, I would follow the recommended layout for SVN projects: Put your code in the /someproject/trunk folder

Mercurial: Merging one file between branches in one repo

谁说我不能喝 提交于 2019-11-28 16:11:27
When I have two branches in Hg repo, how to merge only one file with another branch, without having all other files from changeset merged? Is it possible to merge only certain files, instead of whole changeset? WARNING: such a "dummy merge", as is recommended by @Martin_Geisler, can really mess you up, if later you want to do a true merge of the two branches. The dummy merge will be recorded, and say that you merge into the branch you did the dummy merge to -- you will not see the changes. Or if you merge into the other branch, the changes on that other branch will be undone. If all you want