Tag: git branch

Git rebase circles back to same place again and again

I am having problem with Git rebase that I have to merge the code again and again but still unsuccessful. I had cut of my branch (A) from master. I started working on my branch and made more commits. At the same time, master was also changed and underwent bunch of commits. Now I am […]

How can I undo a git merge, make changes, then redo the merge?

I’m working on branch myDev. I merged in some changes from the master branch last night and while I was doing this, I made the stupid mistake of also running a JavaScript formatter on a few of the files. Today, I’m merging with a colleague’s branch, and now there are dozens of conflicts in a […]

Tracking changes using git during code review (stash vs. branch)

In the interest of keeping code reviews small and concise, I’ve submitted a smaller code review than a full feature. It is the cleanup before a larger change, but to avoid cluttering up the final review with the cleanup, I’ve made this review. My later work will build on this currently active review, and there […]

Is there a way to shorten branch names in git commands?

When I work on a bigger project, I use long branch names, eg. dev/username/PROJECT-JIRANUM_some_description. It would be cool to be able to do sth like this: git branch -D STH(xxxx) Where STH() is some syntax that would use some glob-like matching of branch names (so that xxxx could be a JIRA number contained in branch […]

Git master branch as live version understanding

So I’ve dealt with Git a bit over the last few days and I think I’ve understood the concept.. expect for one thing : How you could handle the master branch as the live version without other branches influencing it? I’m working with a remote repository and I’ve 2 branches : master and development. Now […]

git push to remote, but don't create new branch

Is there a way to git push, but, if the branch doesn’t exist in the remote, throw an error or exit non-zero instead of creating a new branch on the server? The use case is the following. I am creating scripts to help automate the scm workflow in my company. If someone accidentally mistypes a […]

How should I add new files when I already have multiple branches

We have recently started using GIT and it has worked out well, but we sometimes hits bumps that we don’t know how to best solve. Right now we have multiple branches. master, develop and lots of feature branches (one or more per developer). Now we want to add a directory with some script-files, and these […]

Secondary project based on original branched project (in GIT)

We have a project that we’ve been working on for 4 years. We’re launching a similar product that will be based extensively on the other project. In fact, Project B will start with Project A’s code and then be tweaked to the specifications of Project B. We would like for all changes in Project A, […]

Git branch unknown to local clone

I have a git repository with two branches. If I clone my repo I can only see the master branch. I have both branches up to date. The problem is I don’t fully understand merging and branching. Darn it! My example can be seen here: http://github.com/rimian/rimian/network Can anyone tell me how to get this back […]

How to merge the branch with no changes into master branch in git?

Having a basic doubt in git branching and merge . Can a branch be merged without any changes into master . If so , What happens to the delta changes that exists between master and branch . Will that be overridden with master branch changes . Refer the below scenario : I have two branches […]

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