Tag: branching and merging

What is a smarter way to “reset” a dev branch in Git?

I have a master and dev branches. Whenever I merge dev into master I have to use the –no-ff (no fast-forward) method. What I do at the moment, after merging: delete dev start a new dev branch from master This allows me to continue the development on dev after the merge. Is there a smarter/shorter […]

git log not showing branches when you work alone in the project

I have found that I only see branches and the right project topology when using either gitk, sourcetree or git log if I am collaborating with other developers. But when I work alone and I create branches by using git checkout -b branchName, then I cannot see any branch in any of those visual representation […]

Update my git branch with commits in another branch

My question is probably a simple one, but I am relatively new to using GitHub and wanted to check before I do anything wrong. Basically, I am working on a feature branch which was cut from the develop branch. I am still working on my feature branch, but another dev has pushed some changes to […]

Moving commits to another branch with Git

I need to make changesets 2-5 to be on the red (leftmost) branch instead of blue branch. Got weird results with rebase since 2-5 are “based” on 1 anyways. Do I need to cherry pick? I’m currently using Source Tree. Commits 2-5 must only appear on blue branch after the pull request. Meaning they have […]

Replace one local branch with another local branch… and preserving tracking

I have 2 local branches that are tracking different repositories: local-live ( tracks our live repo ) local-staging ( tracks a staging repo ) We have “continous deployment” set up so when I push my local-staging up staging environment will be updated with the changes. I want staging to reflect the code that’s on live( […]

creating a new clean branch in Git for a v2 rewrite

I’m getting ready to start version 2.0 of a library, a complete rewrite. I’ll basically start from scratch, but I’d like to keep working within the same Git repository. I’m trying to figure out how to approach creating a clean new brach for the rewrite. The naive way to start would be to create a […]

Git(hub): change branch?

I’ve forked a repo on github and then made a few changes on master branch. But I made a mistake, I had to work on a new branch not on the master one. Can I change branch or should I fork the master again, then make the branch and apply the changes I made?

Git compare before Merging 2 branches

I have 2 branches which say incompatible when I call for pull request on Git Hub. Is there a way I can compare where the conflict is before I can merge the branches?

How to properly branch for 1.1.8 and for 2.0 at the same time and merging

I am starting from master and want to create a new branch for 2.0 of my app. At the same time I need to work on some bug fixes which will be 1.1.8, so I need to create a hotfix branch. My question here is, when I merge the 1.1.8 branch into master, it will […]

Error in git book or I misunderstood?

Here you can read: Tracking Branches Checking out a local branch from a remote branch automatically creates what is called a tracking branch. Tracking branches are local branches that have a direct relationship to a remote branch. If you’re on a tracking branch and type git push, Git automatically knows which server and branch to […]

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