You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I understand your request, PyGitUp is designed to be a replacement for git pull and in the case you described, git pull would complaining that there are no remotes.
No, I can use git pull on a repo that has no remotes at all. It merges with the branch that it trackes, and that works just fine. Therefore, I think that PyGitUp poses an artificial limitation here.
Hmm.. I tried creating a setup, where git pull merges local branches, git pull complained about missing remotes. Could you describe in detail, how you created your setup?
Thanks, I'll look into that.
Just out of curiosity: I've never seen such a setup before nor can I find anything about it on the internet. Why did you prefer setting the remote to the same repo instead of using plain old git merge?
Well, if I am on a feature branch and do a git merge, it does not default to the upstream branch, although I could change the config to be as such:
mu:~/Projekte/eigene-webseite (content/lagrange/sliding-pendulum<>) LC_ALL=C git merge
fatal: No commit specified and merge.defaultToUpstream not set.
With git pull, it defaults to the upstream branch, without any config setting. And if the upstream branch happens to be remote, it will be fetched automatically. For local branches, it does not make a difference, you are right there:
That's a really interesting way to deal with that.
I've added some changes to make PyGitUp work with your setup and by the way fixed possible problems, where the local branch has been renamed (see aanand/git-up#52). I'll propably release it tomorrow (German time 😉)
Activity
msiemens commentedon Oct 3, 2013
While I understand your request,
PyGitUpis designed to be a replacement forgit pulland in the case you described,git pullwould complaining that there are no remotes.martin-ueding commentedon Oct 5, 2013
No, I can use
git pullon a repo that has no remotes at all. It merges with the branch that it trackes, and that works just fine. Therefore, I think thatPyGitUpposes an artificial limitation here.msiemens commentedon Oct 5, 2013
Hmm.. I tried creating a setup, where
git pullmerges local branches,git pullcomplained about missing remotes. Could you describe in detail, how you created your setup?martin-ueding commentedon Oct 5, 2013
This is my
.git/configin that repo:I create feature branches with
git checkout -b BRANCH -tand then I can usegit pullto merge the tracking target into that branch.msiemens commentedon Oct 6, 2013
Thanks, I'll look into that.
Just out of curiosity: I've never seen such a setup before nor can I find anything about it on the internet. Why did you prefer setting the remote to the same repo instead of using plain old
git merge?martin-ueding commentedon Oct 6, 2013
Well, if I am on a feature branch and do a
git merge, it does not default to the upstream branch, although I could change the config to be as such:With
git pull, it defaults to the upstream branch, without any config setting. And if the upstream branch happens to be remote, it will be fetched automatically. For local branches, it does not make a difference, you are right there:msiemens commentedon Oct 6, 2013
That's a really interesting way to deal with that.
I've added some changes to make PyGitUp work with your setup and by the way fixed possible problems, where the local branch has been renamed (see aanand/git-up#52). I'll propably release it tomorrow (German time 😉)
Use tracking info instead of <remote>/<branch> (closes #6)
msiemens commentedon Oct 7, 2013
Fixed in v1.1.0, you can update it via
pip install -U git-up:)