Skip to content

How to work with two devises and one repository #23754

Discussion options

You must be logged in to vote

Hi there!

The -u flag is short for --upstream - it tells Git “remember this relationship for future use”, so when you have used it once (usually on your first push) you don’t need to use it again.

git pull origin master is the most common workflow, and it will get all changes to the master branch and merge them in to your local copy. Mostly people prefer to get all changes from origin at the same time.

git pull is actually a combination of two commands, fetch and merge, that you can run separately.

git fetch origin master will find out about all available changes to the master branch.

git checkout FETCH_HEAD -- <specific file>will grab only the specified file.

You’ll then need to commit t…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants