Tag: git merge

git merge whitespace conflict

Just did a merge in Git, with below command: git merge -s recursive -Xignore-all-space –no-commit mybranch After checking the merge conflicts, i don’t understand why below scenario cannot be auto-merged. <<<<<<< HEAD ======= def abortService(){ return Boolean.TRUE; } >>>>>>> mybranch It seems that since HEAD introduced no changes and mybranch has the change, and with […]

git rebase master based on timestamp

How do I rebase a repo with duplicate commits based on timestamp ? Some background: We have a dirty repo because of transferring from one git remote to another git remote and adjusting username on the new git remote endpoint. That results in double commits from “another” user, which is actually the same. The single […]

Git – how to merge multiple repositories with common files?

So my problem is like this: I have 2 different repositories and I need to make a different, new one – containing files from these two. However the repositories share some files (main.c for example) which I want to merge manually… I’ve tried to merge repos with this tutorial: http://blog.caplin.com/2013/09/18/merging-two-git-repositories/, however I only get one […]

How to show all logs including the merged branches in git-flow

I took git-flow to do my work, But I wonder how to see the merged-branch logs after I merged the branch. for example, when I finished the branch feature/support_vadp I can no see the logs in that branch anymore. 584c054 – (HEAD, hotfix/fix_duplicated_partial_only_items) Ignore: experimental seeding files (24 minutes ago) <poc7667> bbaffaf – (master) Merge […]

merge requests from gitorious.org to gitlab.com

Our master repository was in gitorious.org. Now the master repository has moved to gitlab.com while the forks (or rather team forks) are still sitting in gitorious.org. Now my query is how do I/we do merge/pull requests on gitlab.com when the repositories are in gitorious.org. While I was able to change upstreams relatively easy using :- […]

Share file between 2 repositories

Given the 2 following repositories: webapp-repoA/ src/ main/ java/ resources/ toshare/theFile.txt webapp/ test/ .gitignore dbRefact-repoB/ src/ main/ java/ resources/ test/ .gitignore What is the sequence of ‘subtree’ commands to get the file “toshare/theFile.txt” located in the “webapp-RepoA” repository to be copied to the “resources” folder of the “dbRefact-repoB” repository? I do not want to create […]

Git cannot merge DIRTY_WORKTREE and conflict in not edit files

I am getting this error when I try to merge master and developer git branch from Zend Studio UI. When I try to do this by command line I get this error: error: your local changes to the following files would be overwritten by merge even that the list of files have not been changed. […]

How to force manual merge for specyfic file (for whole repository)?

I would like to avoid merging *.csproj files in git for all users. Is it possible (for ex. in .gitattributes) add something what always force users to check what they are merging (and make manual decision)?

Git: How to manually manipulate/craft a merge between two branches when no conflict occurs

Say there’s a feature branch that we’ll refer to as branch A. Branch A contains three files, A1 (index.html), A2 (main.css), and A3 (script.js). From branch A, branch B was created/checked out, giving B1, B2, and B3. Now, say that all contents of B1 – B3 where completely removed and totally different code was written […]

git checkout –merge <tree-ish> — <paths> not working as expected

When I try to merge my working tree changes to a file with the ones at tree-ish by checking its path out the former changes are overwritten with the latter changes. I did not expect this behavior. Instead I would expect Git to replace the file content with conflict markers displayed in the default, merge […]

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