Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clone and create a branch #3

Open
JustBrenkman opened this issue Sep 27, 2019 · 2 comments
Open

Clone and create a branch #3

JustBrenkman opened this issue Sep 27, 2019 · 2 comments
Labels

Comments

@JustBrenkman
Copy link
Member

git clone https://github.com/BYU-AGV/tutorials.git
git pull
git branch new_branch
git checkout new_branch

@JustBrenkman
Copy link
Member Author

What does each of these commands do?
pull -> updates your local repository
branch -> creates a new branch off of the current branch(in this case it would be master)
git checkout -> 'checks out' the newly created branch

You can combine branch and checkout into a single command
git checkout -b new_branch

@JustBrenkman
Copy link
Member Author

If you do not know what branch you are currently on use the following command
git branch

When there is no specified branch name git will then just list all of the branches and show which one is currently checked out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant