Reputation: 6410
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
Upvotes: 0
Views: 340
Reputation: 142094
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.
Upvotes: 1
Reputation: 32936
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
Upvotes: 5