Tag: branch

How to realise a deployment branch in Git

I’m using git for a PHP project, I think it’s really handy. There is one thing that would be great if I get it to work. I have created a branch, meant for deployment. It has some differences, like different configuration files and documentation. I can’t just ignore them, because then they will stay in […]

Does deleting a branch in git remove it from the history?

Coming from svn, just starting to become familiar with git. When a branch is deleted in git, is it removed from the history? In svn, you can easily recover a branch by reverting the delete operation (reverse merge). Like all deletes in svn, the branch is never really deleted, it’s just removed from the current […]

How to determine when a Git branch was created?

Is there a way to determine when a Git branch was created? I have a branch in my repo and and I don’t remember creating it and thought maybe seeing the creation timestamp would jog my memory.

git branch naming best practices

I’ve been using a local git repository interacting with my group’s CVS repository for several months, now. I’ve made an almost neurotic number of branches, most of which have thankfully merged back into my trunk. But naming is starting to become an issue. If I have a task easily named with a simple label, but […]

Can I make fast forwarding be off by default in git?

I can’t really ever think of a time when I would use git merge rather than git rebase and not want to have a commit show up. Is there any way to configure git to have fast forwarding off by default? The fact that there’s an –ff option would seem to imply that there’s a […]

Git fetch remote branch

My colleague and I are working on the same repository we’ve branched it into two branches each technically for different projects, but they have similarities so we’ll sometimes want to commit back to the *master from the branch. However, I have the branch, how can my colleague pull that branch specifically. A git clone of […]

How to create a new empty branch for a new project

We are using a git repository to store our project. We have our branches departing from the original branch. But now we want to create a small new project to track some documentation. For that we would want to create a new empty branch to start storing our files, and I would want other users […]

git: Switch branch and ignore any changes without committing

I was working on a git branch and was ready to commit my changes, so I made a commit with a useful commit message. I then absentmindedly made minor changes to the code that are not worth keeping. I now want to change branches, but git gives me, error: You have local changes to “X”; […]

git fetch doesn't fetch all branches

I have cloned a repository, after which somebody else has created a new branch, which I’d like to start working on. I read the manual, and it seems dead straight easy. Strangely it’s not working, and all the posts I’ve found suggest I’m doing the right thing. So I’ll subject myself to the lambasting, because […]

How to commit my current changes to a different branch in git

This question already has an answer here: How to merge my local uncommitted changes into another Git branch? 6 answers

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