Tag: git branch

Git don't merge specific files (or even lines) when merging branches

First of all, I have a feeling that this has been covered somewhere else, however I was unable to find it despite searching both SO and Google. If this is indeed a duplicate please feel free to mark it as so My git-based website is currently composed to two branches – Development and Production. (I’m […]

How to remove unnamed branch in git shown in Github network view

In the Github’s network view of my git repository, there is a “phantom” branch that has no name. Please see the picture below. For the sake of simplicity I would like to remove the black branch (leaving only the blue branch). How can this be done? Some of the labels with the hash:

git: how to deal with to early branching

I did something like: y1-y2-y3-y4-y5 / / x1-x2-x3 / \ / z1-z2-z3 But now I want to have changes from y1 and y2 also in z2 and the the next ones. z3 was already merged into y5. What we want to achieve is something like: y1-y2-y3-y4-…- throw away / \ x1-x2-x3 \ \ \ z1-z2-z3-z4- […]

How to add a branch, created on a forked repo, to the upstream repo?

I was migrating my hotfix branch from Mercurial to Git. I used the hg-git plugin to import my hotfix branch into a new branch on my forked repo of my git project. Is there a way to add the newly created branch to the upstream repo? The branch does not currently exist on the upstream […]

multiple pull requests from the same branch

Say I have 3 branches: master, release and myfeature. Is it possible to create 2 pull requests from myfeature to both master and release without creating another branch? Why might I want this? Say master is the current latest, and release was a year ago. When a bug is fixed a PR is created against […]

Github Pages: This branch is even with gh-pages

I wanted to host a little web app that I wrote on github.io. So I’ve created a new orphan branch and called it gh-pages (it’s essentially the same as my master branch). I made all the contributions and pushed it on Github. It works perfectly just as I have expected it. The only thing that’s […]

GIT – How to get all newly created branches

I have below situation, which I am not getting a solution to. Say I have cloned a project to my local system. Now, in the project if I do git branch -a, it lists me say 3 remote branches along with local branches. Now, after a day, say 10 different developers, pushed 10 different branches […]

Add a local branch but need the origin is also set ( SmartGIT )

Hi i am a beginner for SmartGIT , I want to create a local branch and that same branch name should be in the origin list . Ex : – Currently i have Local Branches (2) develop = origin master = origin origin (2) develop master I want to add a project “MyPro” to Local […]

Git to update all local branches according to the server side

So I pushed my local branch to GitHub created Pull request on GitHub and successfully merged and closed the Pull request and watch this … deleted the branch on GitHub site using the “Delete Branch” button Now, the problem is, I didn’t find what/how to do next, and no matter what I did, my local […]

Generating patch consisting all commits from a historic branch, using only the branch name

We delete feature branches after merging them to the master. On occasions we need to generate a patch consisting all commits from a historic branch that no longer exists. To simplify the process, I’d like to provide a script that generates such patch, requiring only the historic branch name as the input. (branch name can […]

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