0

I am reading the git fetch command from this link : http://gitref.org/remotes/#fetch

It says the syntax as : git fetch [alias] Not sure what to put in alias

This is what git looks like when i do the git branch

* branch1
  branch2
  branch3

Any help on this? Thanks in Advance

1

2 Answers 2

5

You need to put the name of the configured remote repositories in there

Do git remote -v to see a list of the available remote repos you have

Each remote repo you have can either be referenced by its full url or by the alias assigned to it.

By default the first repo you clone from gets the alias origin, so if you have only ever cloned from 1 remote repo then you will want to use the command

git fetch origin
Sign up to request clarification or add additional context in comments.

Comments

1

git fetch origin --all --prune

To a view the names of your remotes you can use git remote -v or see the list in your .git/config files. usually there will be one remote named origin

It will automatically fetch all your remotes and will remove the deleted branches/tags. You will then see the list of the new/removed tags/branches.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.