Tag: git branch

Prevent Git from Deleting Ignored Files

I have a master branch for local development and a heroku branch to deploy to heroku. I have a conf file that I ignore and don’t check into master cause it’s private, but it’s not ignored in the heroku branch and it’s been added to the repo because the heroku server needs it to work. […]

Commit a single file to another branch

I’m on branch feature-x doing some work, when I suddenly encounter an issue which should really be solved on another branch, hotfix. I want to create a commit with that change, but on the hotfix branch. From this question I understand that the standard procedure would be to # On branch feature-x git stash git […]

How should I organize my Git repositories and branches to create multiple versions of a website?

I’m an SVN user hoping to move to Git. I’ve been reading documentation and tutorials all day, and I still have unanswered questions. I don’t know if this workflow will make sense, but here’s my situation, and what I would like to get out of my workflow: Multiple developers, all developing locally on their work […]

How to get git parent branch name of current branch?

Now I am in a feature branch but don’t whether it is created from develop or release branch. Can any one please tell me how can I get parent branch name of current git branch.

How to create a feature branch and reset to origin/master in a single operation?

I often start my journey with a small fix on the master branch that eventually appear more complex than initially thought. So I easily fall in this situation: * Damned I have more stuff to check (HEAD -> master) * Forgot to fix this as well… * Oops, fixed that too * Fixed this * […]

Merge and delete branch in one step/command

Is it possible, to merge a branch and automatically delete it with a single command? The delete step should only be executed if merging was successfull. Thank you all!

Remove incorrect merges from repository

I’m not happy with the title but I think I overcomplicated my explanation and it is as simple as above in the end. We are using a branching model with a central origin repo, a “develop” branch, with feature branches off this branch. I had developed a local set of changes off the develop branch, […]

Is it safe in Git to pre-merge master into my feature branch before final merge?

While developing a feature branch locally, it turned out the feature needs huge changes. In order to minimize the amount of work and stress during the merge, I thought of first merging locally master into my branch, resolve all conflicts, and then merge my feature into master – which should then be a fast forward, […]

Git branching strategy for a newly lean team

We have a web app for which we have a couple of corporate customers. We have recently decided to offer it as a SaaS app and to follow the lean approach (in parallel with our corporate offering). Which means we’ve got experiments on the go that might not make it into production. Before we went […]

git-svn and local branches

I usually using git for versioning, but right now I am stuck with sources in a svn repository, so I am using git-svn to access that repository. However this seems to lead to some trouble, when I try to use local branches. I usually only commit my local repositories about once a day, so I […]

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