Tag: git merge

Merge branches, except for file moves and deletions, with git

Is there a way when merging with git not to merge file moves and deletions? We’ve made a branch and then trimmed down the branch by deleting or moving a large number of files. There have also been a number of modifications made in that branch to the reorganized files. What I now want to […]

Maintain some changes on git merge

I’m a bit confused about a git mechanics. My work has 3 branches master devel and public. I use master for deploy my Node.js app into OpenShift (or heroku); devel is where i develope my feature and i use public for push my open source code on GitHub. Everytime i have to deploy my app […]

Will files that are skipped in git cherry-pick be included in a later git merge?

I’m working on a project using Moodle 2.9.4 There is some code I would like to cherry-pick from Moodle 3 but I don’t want to include some of the files updated in the commits. Eventually the project will be upgraded to Moodle 3 using git merge Will the excluded files will be included in the […]

How can I record the “resolution” of non-conflict merges?

I know that I can use rerere to record the resolution of merges with conflicts. But that doesn’t help me in my current situation: I had an experimental branch which I merged into my main branch using –strategy ours, discarding any changes I made there, but keeping all the history for future reference. The changes […]

How to reverse apply a stash that with conflict?

I have seen the question How to reverse apply a stash? asked by Pat Notz. And I have tried the approved answer, but I get such an error, sudo git stash show -p | git apply –reverse error: patch failed: app/controllers/CloudController.php:673 error: app/controllers/CloudController.php: patch does not apply error: patch failed: app/controllers/CloudGcode.php:1 error: app/controllers/CloudGcode.php: patch does […]

Git, how to “force” a squash rebase

I need to “squash” some commits together. Normally I am used to do something like this: git rebase -i HEAD~10 However, now I am getting the error below: error: could not apply 2009972… fixes When you have resolved this problem, run “git rebase –continue”. If you prefer to skip this patch, run “git rebase –skip” […]

What does smart merge do in Android Studio?

In Android studio there are options at the bottom right corner to handle branches. In Merge option when I merge another remote or local branch, it shows me options like Force merge and smart merge. What exactly they do? When merging with local/remote branches?

Git Merge some folder

I have two git local branches named A and B (which points to the remote branches origin/A and origin/B. Branch – A: Folder-1 File-11 File-12 Folder-2 File-21 File-22 Branch – B: Folder-2 File-22 File-23 Folder-3 File-31 File-32 I want to merge branch B with branch A. git checkout A git merge B The final out […]

Undoing an old fast foreward commit

Looking back at some work I did, there was a fast forward commit that really makes it hard to tell what was worked on, so I would like to move that commit to it’s own branch. Here is my current situation: A–B–C–D And lets say that C is the one commit I want to move. […]

git – start tracking untracked remote files/directories

Let say I do this: mkdir some_repo cd some_repo git init git touch dummy.txt git commit -m ‘dummy commit’ git remote add -f some_other_remote_repo path/to/.git git merge –no-ff –no-commit merge remotes/some_other_remote_repo/master No entering git status I see something like: new: f1/some.txt new: f1/some11.txt new: f2/some2.txt new: f3/some3.txt So now I only want to add specific […]

Git Baby is a git and github fan, let's start git clone.