Tag: branch

Understanding git branching

I have a newbie question about Git. The scenario: 1) I create an “experiment” branch in a project 2) Then I decide to do a change (ex: add files to .gitignore) that must affect the “experiment” branch as well as the master branch or any future branch I would branch from the master branch. What […]

Is it okay to use git without branches?

I have used git a few times and it has always been a painful experience. However i noticed that bitbucket host private repos for free if less then 5 users and I liked the idea of my source code being secured away from my office. So I have created a new private repo on bitbucket […]

Rails – how to start up a local server (thin) with a specific git branch

I have a Rails 3.2.16 app with multiple git branches (for testing features). I use thin to spin up a server in development. If I have a branch called “dev” for instance and I’m currently checked out to that branch in git. By default thinwill pickup whatever is in the app directory and serve it […]

How to pull branch that is called “tag”

I have just begun to work on a new branch that someone has cleverly called tag. Now when I try to pull the changes, using: git pull origin tag I get the error: fatal: You need to specify a tag name. Which I can only assume is because tag is a keyword… I have tried […]

Checkout an older commit and create a new master branch?

As it seems, the master branch of one of my project’s went into a completely wrong direction. So what I want to do is: Checkout an older commit Develop things into a different direction using a new branch Call this new branch master and discontinue the old master branch How do I do this? I […]

Change from master to development branch in SmartGit

I clone a repo using SmartGit but now following good practices I’ll start developing at development branch and then merge this one with master but I don’t know how to change between them from SmartGit. See the image below: There I made right click at development and click on Rebase HEAD to but this didn’t […]

Git push hook to disable push to branch

We need to prevent pushing to some branch on our bitbucket repo. And we think that it will be ok for us to prevent it locally. Is there any way to prevent pushing to some branch locally via some pre-push hook? OS: Windows.

What is the right way to make a branch the new master of a Git repo?

I have a repository which went into an unwanted direction on the master branch, and I now want to copy the repository , revert the master branch back to the point where it veered of, which is a separate branch. Will it be a matter of deleting the current master branch and renaming the branch […]

How do I remove all remote git branches

I want to remove locally all branches that I can see with git branch -r. I’ve already removed all files from .git/refs/remote/*/ and appropriate records from .git/info/refs, but they are still there.

How to put repository onto another repository as branch so they have some shared commits?

I have bazaar repos, A and B. They have some shared commits, because B diverged from A some time ago. What I need to do, is to export them to git, so now I have two git repositories, but (it’s difference between git and bzr), it’s no way to perform merge between them. bazaar——————-A mergable […]

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