Search the Community
Showing results for tags 'git'.
Guys, Whoever is still using Mercurial on Bitbucket, it's time to migrate to GIT. Bitbucket is deprecating Mercurial: The procedure is easy enough: Install stuff virtualenv -p python2.7 ~/python . ~/python/bin/activate pip install dulwich urllib3 brotli ipaddress or if you don'd mind installing stuff directly into your System sudo pip-2.7 install dulwich urllib3 brotli ipaddress And then follow the instructions on https://hg-git.github.io Windows users will need a slightly different procedures, but it's essentially the same thing. Some older KSP projects are hosted in Bitbutcket, and perhaps some of them are using Mercurial. It seems a good time to clone and convert them for historical reasons!
Greetings, esteemed and beloved modders. I'm trying to figure out how to do something with git, and I'm posting here because it's KSP-mod-related and because so many mods are on github that there must be a high degree of git expertise here; this may be a trivial question for some of you. I've been reading git tutorials and guides and so on, which so far has only made me feel like I have some sort of git-specific learning disability; I still have to rely on googling "how to do <svn command> in git" and praying that my situation is close enough to what the resulting blog post is doing. What I've done so far: Clone the KerbalEngineer github onto my local disk sometime around September 2015 (version 184.108.40.206 according to the old ASSEMBLY_VERSION, though its changes are subsumed into 220.127.116.11 in the latest changelog) Play around with it for a while locally (to add a US customary units option) without running any further git commands Let it sit for a while, so I ended up with uncommitted changes to an old version Finally create a github account within the last few weeks Fork the main KER repo onto my github account (so, ~9 months after my initial clone) Commit my changes to my local repository (I think? It shows up in git log, anyway) Change the remote of my local copy from the originally cloned main KER branch to my own forked branch (I think?) Possibly some other things; regrettably I did not take careful notes while researching and experimenting I don't think I stashed anything I'd like to bring my changes up to date and clean them up enough to submit a pull request (if that's how it works?). Current state: git diff --cached shows the changes that everyone else committed since September that don't conflict with my changes (which makes me think I must have staged those after a merge, if that's a thing) git diff shows BuildAdvanced.cs (whole file changed? but I don't remember what I did to it, so I'd like a better diff) and Units.cs (my core changes) git status says I've staged everything but those two files, so presumably I need to resolve conflicts on them: On branch master Your branch and 'origin/master' have diverged, and have 1 and 38 different commits each, respectively. (use "git pull" to merge the remote branch into yours) You have unmerged paths. (fix conflicts and run "git commit") Some of my changes are in neither git diff nor git diff --cached, but are present in the working copy; I hypothesize that these are the things I changed that didn't have any conflicts. So they're already committed, even though they depend on changes that aren't committed yet? I don't think I want it to be in this state; I want to see my changes only in a diff, and all together in one diff only, with everyone else's changes already incorporated, as if I had made my changes originally on the current branch. Is that possible? If so, how do I get there from here? Am I supposed to "cherry pick" my local commit? If not, what's the better way? This has got to be a fairly common use case, if not the most common (clone/fork a project from github, commit/push changes, submit a pull request), so I feel like I'm missing something (scratch that, I'm sure I'm missing plenty in general about git). Also, how do I keep my github fork up to date in the meantime? I don't want to get out of sync and have to do this all over again. Thanks in advance for any help! I may have left out some relevant info, so please name any additional commands to run and I'll post the output. (A humble plea: Please don't refer me to yet another git tutorial unless it's about this exact specific question; as I've said, I've already been reading them and they just aren't helping.)