github update trouble
@ssoloff not sure where to post this at git or here for that matter but this seems as good a place as any. I can't update. Here's what I get:
It's been a while since I've done it but other than the first time it's always worked pretty easily. I cloned from the map repo place. then opened the folder in my git repo and replaced the map. It seems as if I'm behind/not up to date or something. I don't remeber that happening before.
I'm guessing I'm screwing up when I add the changes somehow, but pretty sure that's how i did it before. Adding the whole map I don't have to d with all the changes separately.
Anyway if you would clue me in on where I'm messing up I'd appreciate it.
So I found this:
unfortunately I don't understand it. Do I need some sort of admin approval before I can do anything ?
@beelee so something totally fckd is going on now. It's deleting my Japanese units :
wtf on day 3 of this bs lol
@beelee The error you're seeing is due to there being changes on the
testbranch on the remote repo (
origin) that are not in your local repo. One way this can happen is if you have two local copies of the repo connected to the same
origin, and you made different changes in each local repo.
The most straightforward solution to the problem is exactly what the error message tells you to do: run the
git pullcommand. However, this can fail if there are changes made to the same line(s). This results in a conflict and Git will tell you if this is the case after running
git pull. If you run into this issue, I'll have to give you a primer on how you go about resolving conflicts.
It would be interesting to see how your local
testbranch is out of sync with the same branch on
origin(https://github.com/triplea-maps/global_40_house_rules/commits/test). You can do that by running
git log --statand posting the output here.
Just looking at the
origin, it appears it is waaaay behind the
masterbranch. In fact, I'm not sure it even has a common parent. I'm guessing when you started on your latest changes, you simply used the existing
testbranch from January 2018, and that you didn't start a new branch from the current
One typically begins each new unit of work (a pull request in GitHub parlance) with something like
git checkout -b my-new-branch master. That creates a new branch named
my-new-branchso that it is basically a copy of
master. Then you commit changes to that new branch and push them to
origin. Once your pull request is complete, you would delete
my-new-branch. When you're ready to start your second unit of work, you would repeat that process with a different branch (e.g.
@ssoloff thank you for your reply
my apologies for my earlier frustration . I'm not real sure how my stuff can be out of date but I have enough to try something else. : )
@beelee so I took a break and tried again. Even more confused now.
I kept getting there's nothing to compare in my PR etc... anyway I fired up triplea and the map has been updated. Unless I've completely lost my mind, I never updated "maps yaml". I never saw the PR show up on Git.
Idk what's going on ? has the map update process changed in the last 6 months ?
W/e it's updated but I'd like to understand it.
Sorry for getting pissy earlier.
@RoiEX Thanks for the reply. Yea Idk what happened here. Have updated several times and have never experienced this. Seems as if it upated itself. No yaml PR or maps one. Nothing in my email.
Anyway gonna try again and see what happens.
@beelee yea that's what it's doing. Auto update. I guess I missed where that had changed. Surprised you don't have to change the yaml. Was looking for something already done . Anyway a lot easier this way.
However I'm having trouble with a new image not showing up. Used to be it'd throw an error but doesn't now. Nothing in the debug.
I'm gonna try and drop and drag them in but it's weird that the notes and xml number all change and they don't. Double, triple checked and tried it several times now.
See what happens this time
ok finally got them to show up. Not sure what was up. Anyway should I update the yaml ? or do we not do that anymore ?
@beelee You discovered the biggest flaw with the yaml approach.
All incrementing the number in the yaml does is force a re-download of the map if the number your downloaded version is associated with is lower.
So if you delete the map manually you will always get the latest version, just the way it is.
git is actually the best source control I've used. Stick it out, it's well worth it. I've never used it professionally and I'm not really sure why that is. Never even heard it discussed.
One thing ssoloff didn't mention is that one would typically make sure your repo was up to date before you started anything. You can use git pull. Otherwise there's a chance you are making a change on an outdated version of something or other. If there is some change in your master and you want to make your branch on the upstream master you can use "git fetch" then create your branch as an image of origin/master. Which means that your ignoring what is in your master.
Typically it isn't the best idea to make changes on the master branch unless your pretty sure no one else is changing it.
If you need to see what commits are in your branch, you can use "git log" and you can diff a commit with git diff.
Are you pushing to an origin you have write access to? If not, you'll need to create your own fork and push to that. Then create a pull request and get someone with write access to incorporate your changes.
@simon33 yea that's what was confusing me. before I'd have to submit a PR, then when that was approved, I'd do another for the yaml.
I'm getting the clone from triplea-maps where I was invited when I first submitted the map.
Now, however, when I merge my test branch to my master, it automatically updates the map. It never did that before. That's why I couldn't figure out what was happening.
I always delete my git-repos, make a new one and then clone from triplea-maps, so I'm pretty sure that would make everything up to date.
Once again, the big confusion was not seeing a PR show up like where your Rockets one is. It used too and I missed when that changed.
Yea I'm not gonna give up on git. I may be stupid but I'm also tough. Just got a little frustrated when something that took me about 15 minutes previously wasn't working the same.
Anyway, thanks for the info.
So is it working for you now?
Just to run through it, if you have write access you can use a different path where you bypass the PR process completely and just push to origin/master (it's usually called that but doesn't have to be). If you don't have write access you cannot do that. Not entirely sure which case you are trying to get help on actually.
@simon33 yea It's working now. I just didn't realize it had updated when it did. Usually took an admin to approve.