Git create branch command line
I'll use angle brackets in these command line examples when you need to change a value.
![git create branch command line git create branch command line](https://roytuts.com/wp-content/uploads/2020/09/image-32.png)
To create a new branch, and switch to working on that branch:
![git create branch command line git create branch command line](https://confluence.atlassian.com/get-started-with-sourcetree/files/847359118/847754495/2/1520270893420/git_st_create_branches.png)
Unless you add a new branch and start working on it, the master branch points to the last commit you made. The default branch in Git is known as the master branch. Each branch's tag 'moves' with the commits you make, applying to each new commit in turn, until you swap to a different branch. Branching with Gitīefore I describe branching operations, I'll step back for a moment to talk about some key concepts around branching in Git.Ī Git branch is simply a tag which is applied to certain commits. I'll continue with the previous blog's format, comparing how each operation is carried out through the command line, through Visual Studio, and through SmartGit. In part three, I'm going to describe the basic branching operations, and sharing changes between your local repository and a remote repository.
Git create branch command line how to#
I described how to clone a repository, commit new versions of the source code locally, view the commit history, and undo local changes. In part two, I looked at some of the tools we use to work with Git at endjin: GitHub, Visual Studio's support for Git in Team Explorer, and a third party Git client, SmartGit. In part one, I talked about Git's distributed architecture, its approach to version management, and its support for frequent branching and merging. This is part three of a set of blogs I'm writing as I learn about Git.
Git create branch command line software#
By Alice Waddicor Software Engineering Apprentice III 14th March 2014