github - How to git fetch another branch after cloning a single branch -


i working in system automatically git clones using --branch arg so:

git clone --branch master --depth 50 git@github.com:something/cool.git ~/cool 

and push branch. can't figure out how track remote since git fetch , git pull don't seem able access them.

i ended modifying config each branch (or branch glob) want fetch. expressed alias:

[alias]     # usage: git add-fetch-branch remote branch     add-fetch-branch = !sh -c 'git config --add remote.$0.fetch "refs/heads/$1:refs/remotes/$0/$1"' 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -