GitHub Desktop

Discuss coding questions, pull requests, and implementation details.
User avatar
MeteoricDragon
Posts: 137
Joined: Mon Feb 12, 2018 8:23 pm

Re: GitHub Desktop

Post by MeteoricDragon » Sat Mar 31, 2018 2:51 am

So, after entering the command in Git.

Code: Select all

C:\Users\meteo\Documents\GitHub\daggerfall-unity-mycopy>git pull --rebase
Already up to date.
Current branch master is up to date.
git pull --rebase shows that the master branch is already up to date. I thought to myself: "that can't be true, my forked repository on github for DFU indicates it is several commits behind.". https://github.com/MeteoricDragon/daggerfall-unity the master branch shows 1 commit ahead and 24 commits behind Interkarma:master. The "Head-bobbing" branch shows 26 commits behind. the two different files are headbobber.cs and meta headbobber.cs. If I wanted to make edits based on the new commits in interkarma's master, how could I do that if my forked copy isn't up to date with said master?

EDIT: here is where it gets interesting. https://github.com/Interkarma/daggerfal ... ad-Bobbing is when comparing my Head-bobbing Branch to Interkarma's master, it reports no commit difference... What the :?

User avatar
Hazelnut
Posts: 916
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: GitHub Desktop

Post by Hazelnut » Sat Mar 31, 2018 9:02 am

I suggest you do some research on Git and Github, about how to use them. There's a lot of information out there to read. I had to do this when I started contributing, since I had not used Github before. It's worth spending the time learning about it if you're planning to contribute. Github desktop can't do everything and to sync your fork you will need to use the command line.

User avatar
MeteoricDragon
Posts: 137
Joined: Mon Feb 12, 2018 8:23 pm

Re: GitHub Desktop

Post by MeteoricDragon » Sat Mar 31, 2018 7:18 pm

Hazelnut wrote:
Sat Mar 31, 2018 9:02 am
I suggest you do some research on Git and Github, about how to use them. There's a lot of information out there to read. I had to do this when I started contributing, since I had not used Github before. It's worth spending the time learning about it if you're planning to contribute. Github desktop can't do everything and to sync your fork you will need to use the command line.
Will do.

EDIT: just wanted to report that I figured it out. Here's the link I found that helped me: https://help.github.com/articles/syncing-a-fork/

User avatar
MeteoricDragon
Posts: 137
Joined: Mon Feb 12, 2018 8:23 pm

Re: GitHub Desktop

Post by MeteoricDragon » Sun Apr 08, 2018 7:21 pm

Interkarma wrote:
Fri Mar 30, 2018 2:38 am
Great stuff, thank you for that. I can see the PR there and will process this as soon as I have time. If I have any feedback or need changes made before merging, I will add that to the comments on the PR.

And yep you've got it right - develop on your fork and send your changes to me via PR. It also helps to make a branch on your end for changes so you can keep them separate from the master code.
I think I made a mistake, I think I accidentally pushed my fork's master branch to yours.
I think I accidentally pulled code from your "Camera-Recoil" branch into my master branch fork of DFU, (thinking it was my branch) but it actually was an older version of the code i submitted to you before. now I am 8 commits ahead of your master, And want to revert the master on my fork to your fork.

I'd like to just simply synchronize my fork with yours, and get rid of any commits that github thinks I wish to be ahead of yours.

EDIT: I deleted my headswayer branch and used this web page https://gist.github.com/glennblock/1974 ... orced-sync to help me reset the fork. Now I just need to figure out how to get my code from your camera recoil branch...

User avatar
Interkarma
Posts: 3590
Joined: Sun Mar 22, 2015 1:51 am

Re: GitHub Desktop

Post by Interkarma » Sun Apr 08, 2018 9:14 pm

If you don't see my branch listed in GitHub desktop's dropdown menu, hit the F5 key. You won't get any feedback but it should make my branch visible in the dropdown under master branch.

Once you have the branch selected, pop the sync button and you'll have that version of the code brought down locally.

What would you like me to do with your current PR?

User avatar
MeteoricDragon
Posts: 137
Joined: Mon Feb 12, 2018 8:23 pm

Re: GitHub Desktop

Post by MeteoricDragon » Wed Apr 18, 2018 11:53 pm

I've been working on a branch that I created from Interkarma's master branch a while ago called "croucher". My master branch was recently updated. but I know that commits that were made to the master branch won't be made to the 'croucher' branch without the right git command. I've found in the past that using git merge upstream/master does update the branch with commits to the upstream master, but it adds all commits (even ones other people made) to my branch.
When I try to publish my branch, it will have all records of commits in the PR that I submit to Interkarma. If I try to rebase with the interactive option, I can pick which commits I want to keep (ones that I made), but If I choose to drop or squash the other commits, and submit a PR. the commits become ones that undo the original commits. For example, if a line was added in a commit that I didn't make, and I chose to drop that commit, the commit appears as one that will remove that line from the upstream master code when I try to submit a PR. I was seeing that happen when I tried to remove commits for my SoundMusic branch (#690) earlier.
I'd like to be able to update my branch with the new master branch code that gets submitted to interkarma/daggerfall-unity without creating unwanted commits in my branch. What can I do?

User avatar
TheLacus
Posts: 681
Joined: Wed Sep 14, 2016 6:22 pm
Contact:

Re: GitHub Desktop

Post by TheLacus » Thu Apr 19, 2018 4:15 pm

Did you try my answer on github? If you use rebase instead of merge you don't get the "Merge remote-tracking branch 'x' into y" commit. Try pull --rebase in a test branch and see if you can get it to be synced with master :)
If you are interested in creating mods for Daggerfall Unity you can find the documentation here.

User avatar
MeteoricDragon
Posts: 137
Joined: Mon Feb 12, 2018 8:23 pm

Re: GitHub Desktop

Post by MeteoricDragon » Sun Apr 22, 2018 9:45 pm

TheLacus wrote:
Thu Apr 19, 2018 4:15 pm
Did you try my answer on github? If you use rebase instead of merge you don't get the "Merge remote-tracking branch 'x' into y" commit. Try pull --rebase in a test branch and see if you can get it to be synced with master :)
I tried it and was successful. I had better success doing it with Visual Studio's Team Explorer toolbar. it made comparing the conflicts in PlayerAdvanced prefab easier to decide for me. Thanks!

Post Reply