git-merge

Gitlab merge a merge request from command line not generating any commit(no fast forward)

你离开我真会死。 提交于 2019-12-11 04:26:34
问题 I am trying to Merge a Merge Request manually from command line . In the merge window of Gitlab, there is already some codes are present to do that. Whenever I merge a request from the Gitlab website, it generates a merge commit, which is known as --no-ff commit. But when I am trying to do that manually, it is not generating any extra commit although I have specified the --no-ff option in command line. Any suggestions? I have already tried with the commit amend option as well. git fetch <Fork

How to use git merge-base on remote?

旧街凉风 提交于 2019-12-11 03:49:09
问题 How can use merge-base with Git on a remote repository without checking it out? Using ls-remote works fine e.g. for determining branches like this: git ls-remote --heads $REPO_URL/$REPO_NAME The documentation contains no clue, wether the use of merge-base with ls-remote is possible. Maybe it is also possible, to use alternatives to merge-base to find the common ancestor for branches/commits. At the moment, i have to checkout the repository locally, which takes a lot of time for big projects.

libgit2sharp what is correct sha to supply to GitHub API merge pull-request?

青春壹個敷衍的年華 提交于 2019-12-11 03:46:31
问题 GitHub API requires merge pull-request to be submitted as PUT /repos/:owner/:repo/pulls/:number/merge with request body json { "commit_message": "blah", "sha": "{SHA that pull request head must match to allow merge}", } Following a commit, push, create PR, what libgit2sharp property supplies the correct sha ? For the current branch, it appears Branch.Tip.Sha is the correct value, but I'm receiving response error : { "message": "Head branch was modified. Review and try the merge again.",

How to find out parent revisions of an in-progress merge?

拜拜、爱过 提交于 2019-12-11 03:08:47
问题 I've started a merge, but it had conflicts which I've resolved, and now it's all staged ready for commit. I just want to double-check which parent revisions I've merged. Things tried so far: git show with the %P format specifier - except I cannot figure out how to get it to tell me the parents of the uncommitted merge git rev-list with various options, to no avail googling for a git equivalent to hg parents , which brings me back to git rev-list but with no success: it lists five revisions,

git cherry-pick: how consider only lines modified by the commit (i.e., not the surrounding context)?

狂风中的少年 提交于 2019-12-11 02:49:30
问题 I have a project with two branches: D---E branch1 / ---A---C branch2 I want to apply commit E (but not D) on top of branch2. I used git cherry-pick and git mergetool (with meld ) for resolving conflicts. So far, so good. However, suppose that the state of the file after commit C is lineC1 <context C> lineC2 and the change introduced by commit E is -lineC1 +lineE1 <context E> -lineC2 +lineE2 I would expect the result shown by default by the mergetool to be lineE1 <context C> lineE2 (i.e.,

Git subtree post hook

随声附和 提交于 2019-12-11 02:49:22
问题 I would like to be able to update subtrees automatically. I have one repo that consists solely of subtrees from third-party repos, and would like to use a post hook to update these whenever the main repo is pulled. 回答1: Just as a concern, in development of larger projects it's often important for dependent libraries to remain stable. If you constantly pull the changes automatically you don't have the opportunity to confirm that they don't come with breaking changes for your parent project. If

How to quit (not abort) a Git merge in progress keeping the changes uncommitted?

让人想犯罪 __ 提交于 2019-12-11 02:34:19
问题 When a Git merge stops due to conflicts or because the user asked for it by using the --no-commit option, the merge is considered to be still in progress, what is indicated by the existence of the file $GIT_DIR/MERGE_HEAD . This state typically ends when the merge result is committed or the merge is aborted. In the latter case, the changes that were introduced by the merge are rewound. Is there any way to finish the "merge in progress" state without generating a commit and without loosing the

Avoid merging master into development branch

China☆狼群 提交于 2019-12-11 02:14:50
问题 I have been monitoring two branches starting from each sprint - Release and Master . Master branch is from where developers create new branch(task specific), implement their changes, and creates pull request which gets merged into the Master . Release branch is sprint specific which remains always submittable to the production. We only merge branches committed to the Master and verified by the QA into Release branch. This approach works best for us as we submit Release at fix regular interval

How to deal with xxx~HEAD after git merge?

亡梦爱人 提交于 2019-12-10 22:06:02
问题 In my branchA: I copy a file from folder04/config.xml to folder05/config.xml , then git add and commit . In my branchB (B is branch out from A): I already have one file named folder05/config.xml . Now I merge branchA into branchB , it appears a weird conflict like this. Untracked files: (use "git add <file>..." to include in what will be committed) folder05/config.xml~HEAD It generates a file named config.xml~ HEAD , what does it means? I can't understand why, and what should I do in this

How to resolve Git merge conflict

核能气质少年 提交于 2019-12-10 21:49:36
问题 I am new with github and am trying to merge my master and gh-pages branches. While trying to merge, I had a conflict. Now I get the following message How do I fix it? 回答1: Take a look at your current status: git status You'll probably see some files which are staged for commit and some which have local changes. The staged ones are those which merged without problem. The ones with local changes have merge conflicts. Open up each of those files, and you'll see something like this somewhere