Tag: merge

Git: How do I remove a branch that has already been committed, pushed, and merged into master?

I have a branch that has been committed, pushed, and merged into master. It did not pass QA. We need to pull that branch out of master for a release. How do I pull that branch out of master. Assume the branch name is “to-be-removed”

Git Merge two repositories that are years apart with thousands of conflicts

Repository A: The old fork we’re working on now, but with hundreds of recent commits based on 3-year-old code from B. The history is long gone – it only goes back a few months when the repository was first uploaded to Github. Repository B: The new, current one we don’t have access to. Years of […]

Make All Merges Manual in Git

I need to know how to manually edit every merge. I found answers on here but everything is only when there is a conflict of merging. I implemented these and if there are new files pulled or no direct conflict between the code it will auto merge, which I can’t have. I want to manually […]

Is it OK to merge another branch into mine and then merge both into master

Let’s say I have three branches: master, feature-A and feature-B. I’ve added some commits to the feature-A branch and created a pull request that waits for code review. Now I want to work on feature-B, but I’d like to use the code I’ve added in feature-A. So, will it cause any problems if I: create […]

Add three versions to a new git repository

I have three different versions of a program, and now, much too late, I would like to move it into a git repository. Would it be possible to start a repository with the live environment and add the test and development environment each into a branch?

How to merge git repository with changes from different upstream

Years ago I created a public repository of a SourceForge project on Github. Back then, the project only supported CVS, so I used git cvs to periodically sync my repository with the original. There have not been any commits to the CVS repository for a long time, and now I found out that they moved […]

merge strategy in .gitattributes not working

I want git to never have a conflict on this file: test/file.txt when merging. I tried the following in .gitattributes test/file.txt merge=theirs but I need to define the theirs merge strategy. I saw online that I can define the ours strategy by executing this: git config –global merge.theirs.driver true which sets the driver to true […]

How to merge changes to both branches

Right now I have a develop branch, and I create a new branch feature-keyboard using git checkout -b feature-keyboard develop as a new version. Right now I need to do changes to both branches. What I am doing right now is I do so: git checkout -b feature-ui-changes develop and then add some changes commit […]

merging code outside of git into an existing git project

I have an existing git project, let’s call it BobCrane. This needed to completely re-work this project’s extensive directory structure. I created the needed directory structure on the filesystem, outside of any git project. I then manually copied each file from the cloned BobCrane repo into this new directory structure. So the new directories are […]

how to make branches identical

I have a branch master in my repo origin and a branch origRepo/master (where origRepo is my upstream for origin, where I fetch always the changes from origRepo. So far I have always been doing this to get only selective files of the commits in origRepo. Basically a partial merge. First I made sure that […]

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