Code: Select all
git fetch --all
Moderator: Committer
Code: Select all
git fetch --all
Correction:MatGB wrote:A memo postis needed to update your local list of the branches on the remote, you can't switch to a new remote branch unless you ensure your copy knows it exists. So if another Dev has a shiny new feature in a branch for testing, you need to make sure your copy of git knows that branch is there before you spend half an hour trying to figure out why you can't switch to it, merge from it, pull from it, etc.Code: Select all
git fetch --all
Code: Select all
git fetch
Code: Select all
git fetch --all
Code: Select all
$ cd <fo repository>
$ git remote add geoff [email protected]:geoffthemedio/freeorion.git
$ git remote add adrianbroher [email protected]:adrianbroher/freeorion.git
$ git remote add vezzra [email protected]:Vezzra/freeorion.git
$ # some more remotes
$ git config remotes.team 'geoff adrianbroher vezzra <some more remote names>'
$ git fetch team
Your local repo is perhaps set up with origin being your github fork, and the main FO repo as 'upstream'? (That's how I have mine.) So you would need to do 'git fetch upstream' (or 'git fetch --all' like you've been doing) for your repo to be made aware of a new branch in the main repo.MatGB wrote:Well, just simply using fetch wasn't getting me anywhere, my branch list refused to admit there was a new branch there, but fetch --all got it.
Does --all have sence in that case?MatGB wrote:Actually, I don't think I've touched my github fork at all since I switched to Linux, I'm doing everything from main, occasionally creating a branch to test something.
That's what it looks like, I can't see any of the things you've done actually in trunk itself, were you testing stuff on your home machine?Geoff the Medio wrote:I just did... something... Possibly pushed nonsensical changes to a bunch of branches I didn't intend to. Seems to have generated a bunch of commits that merged branches into themselves?
Edit: Possibly it created branches in the freeorion repository that were originally in other people's repositories?
I didn't do anything new in the trunk. I was creating a new branch and attempting to push it so that I could make a new pull request, which succeeded. But apparently I clicked the wrong option in the push dialog and pushed every branch I have locally, which includes various old branches from pull requests that I probably don't have write access to.MatGB wrote:...I can't see any of the things you've done actually in trunk itself, were you testing stuff on your home machine?
That makes sense, I, um, nearly did that myself last week and it would be even easier to use in Git GUI on Windows (I did it on my Github repo several times).Geoff the Medio wrote:I didn't do anything new in the trunk. I was creating a new branch and attempting to push it so that I could make a new pull request, which succeeded. But apparently I clicked the wrong option in the push dialog and pushed every branch I have locally, which includes various old branches from pull requests that I probably don't have write access to.MatGB wrote:...I can't see any of the things you've done actually in trunk itself, were you testing stuff on your home machine?
MatGB wrote:I can't figure out how to push just one branch from my machine to the main project repo, I'd like to but it doesn't seem as easy as I'd hoped and I don't really need it (although I will after Release, I've got a few Projects in mind that'll need help).
Code: Select all
git push <name of remote> <name of local branch>:<name of remote branch> [<name of local branch>:<name of remote branch>]
Code: Select all
git push upstream foo:bar
Code: Select all
git push upstream foo
If you plan to push more changes to this branch you can add '-u, --set-upstream set upstream for git pull/status' this will allow to do git push and git pull without arguments at next time.adrian_broher wrote:MatGB wrote:I can't figure out how to push just one branch from my machine to the main project repo, I'd like to but it doesn't seem as easy as I'd hoped and I don't really need it (although I will after Release, I've got a few Projects in mind that'll need help).Code: Select all
git push <name of remote> <name of local branch>:<name of remote branch> [<name of local branch>:<name of remote branch>]
With SmartGit that is just a simple rightclick on the branch.MatGB wrote:I can't figure out how to push just one branch from my machine to the main project repo, I'd like to but it doesn't seem as easy as I'd hoped
Only for users of inadequate GUIs. I generally use pretty much the same process adrian_broher talked about, and SmartGit supports it wonderfully. If there are no conflicts, combining tiny related commits into a more medium sized commit only takes seconds, and can help make it easier to really review the set of changes. As we've talked about before, if there are conflicts then clearing them with rebasing makes a clearer product for other people than just merging. I know you've messaged me about this process you do with merging and them making a diff and then applying that, and if that's what you did for your PR #221 then I'll say the end product looks ok so long as it makes sense to squash it all down to a single commit, but in that case it would have been even simpler to first squash it where it was, and then rebase that to current master. Much fewer steps than what you talked about.Cjkjvfnby wrote:You way is impossible for GUI users.
How can you keep saying this? Especially when there are plenty of articles talking about the value of a good git history and your teammates (including one who seems quite experienced with this, adrian/Marcel) say they want the benefit of that good history. You are kind of seeming like the guy who hates commenting, and so just does a few trivial comments here and there, and then says that since his comments are useless, that writing good comments "does not improve process".Making good history take too much time and does not improve process.