Working with Git and Visual Studio – Use Git Rebase inside Visual Studio

This blog post is part of in-depth blog series on the working with Git command line and Git in Visual Studio. You can find the previous blog post here. In previous blog post, we discussed how to use git rebase commands, the effects of same on the branching strategy and also rebasing on the same branch. In this post, we’ll discuss how to use git rebase inside Visual Studio.

Re-creating Problem Scenario

For starters, we have two branches named master and newQuickFix branch in Continue reading “Working with Git and Visual Studio – Use Git Rebase inside Visual Studio”

Working with Git and Visual Studio – Use git rebase with git command line

This blog post is part of in-depth blog series on the working with Git command line and Git in Visual Studio. You can find the previous blog post here. In previous blog post, we discussed what is git rebase, how it is different from git merge and when to use the rebase command. In this blog post, we’ll follow that up by using git rebase commands at git command line and understand it further.

Re-creating Problem Scenario

For starters, we have two branches named master and newQuickFix branch in our

Continue reading “Working with Git and Visual Studio – Use git rebase with git command line”

Understanding Git Rebase and when to use it

This blog post is part of in-depth blog series on the Git and Visual Studio. You can find the previous blog post here. In this blog post, we’ll understand what is git rebase, how it is different from git merge and when to use the rebase command. The git rebase command is one of those commands which can work magic for managing the future development of a product by simplifying git history but it can be disastrous if not used carefully. Essentially, git merge and git rebase do the same thing, i.e., bring the contents of two branches together. However both of these commands execute this change, in entirely different ways.  Continue reading “Understanding Git Rebase and when to use it”

Swap master branch with another branch in Git

In git, branch is just a pointer to the one of the commits. So you can create and remove branches very easily. Most of the time, you can select commit of your choice and create a new branch from their and delete the one you do not need. However, sometime you create one branch out of master, intending to merge it to master but later everyone starts using the same and it becomes kind of master. We ran into this situation with one of the source code repository. So to get back on track, we needed to swap the contents of the both branches.  Continue reading “Swap master branch with another branch in Git”

Working with Git and Visual Studio – Merging Changes using Visual Studio

This post is part of the series of posts on the Git and Visual Studio where we are discussing in detail on meaning of basic git operations, how to do them in Git and Visual Studio both and understand the difference of both tools. You can find the previous blog post here.

In previous blog post, we discussed what is Git Merge, types of Merging and how to achieve the same using git native commands. In this blog post, we’ll learn how to do the same by using Visual Studio.

Fast-forward Merge / Simple Merge

First, let’s reset everything back to commit before merge by using git reset –hard so that we can now compare the results how we did in previous post vs using visual studio. Continue reading “Working with Git and Visual Studio – Merging Changes using Visual Studio”

Working with Git and Visual Studio – Understand Git Merging and Merging changes

This post is part of the series of posts on the Git and Visual Studio where we are discussing in detail on meaning of basic git operations, how to do them in Git and Visual Studio both and understand the difference of both tools. You can find the previous blog post here.

In this blog post, we’ll learn what is merging, types of merge and how to do the same from git command line.

What is Git Merge

Git merging is way of combining the commits made in separate git branches. It is used by git pull command as well to incorporate committed changes from one branch to another branch.  Continue reading “Working with Git and Visual Studio – Understand Git Merging and Merging changes”

Working with Git and Visual Studio – Restore a deleted branch in Git

Sometimes, you delete the branch that you were working on thinking that it was not needed later, only to realize that you need it again. If you are familiar with the git bash shell or native git commands, there is nothing much to worry.

It’s possible to restore deleted branch in Git if you happen to remember few basic details. In this quick blog post, we are going to cover on how to restore a deleted branch in Git.

For demo purposes, we’ll start with one of the existing repos that we are using: Continue reading “Working with Git and Visual Studio – Restore a deleted branch in Git”