Having difficulty with Git, trying to submi a pull request
#1
This is my first time using Git. I signed up at Github, followed the Github instructions on generating keys, forked the Xbmc repository, cloned my new repository (AaronDnz) and made a few changes for a trac ticket.

After compiling and verifying that it is all working, I right clicked on the XBMC folder and chose the menu option "Git Commit -> Master". It showed the files I had changed correctly, I typed in a comment, and it appeared to upload everything and at the end said it had committed the changes successfully.

However, on Github I can't see my commits showing up in my repository. I want to submit a pull request for the changes, but when I try and essentially says that there are no changes compared with the xbmc repository.

What am I missing or doing wrong?
Reply
#2
You pushed the changes after committing them locally?
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
I thought committing them was the act of pushing them up to my repository? Is this not the case? I haven't done anything else.
Reply
#4
No, the actual commit is local only. To get your changes into the repository you'll have to push them.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#5
strictly speaking, you are correct. but you forget the fact that your repository is just that, yours. it's not the one on github, it's the one on your machine.
Reply
#6
Ok, got it sorted now. Thanks.
Reply
#7
A few more questions, if anyone is willing to help.

1. Now I have my remote repository on Github with my changes, and I have a pull request to the xbmc master repo. My remote repository is a few days behind xbmc master. How do I update this, update my local repo, but preserve my changes?

2. After I committed the changes, it changed the CR/LF to just CR. I saw a setting about this when I installed Git. When I opened the solution in Visual Studio, it turned them back into CR/LF and has marked the files as changed. How it shows them as being changed in Git. How do you manage this on a Windows platform?
Reply
#8
1) it's called a rebase. first add upstream repo as a remote,

git remote add upstream git://github.com/xbmc/xbmc.git

then to update you do
git fetch upstream to fetch upstream changes,

then git rebase upstream/master.

note that rebasing means rewriting history, so you need to use git push -f

2) you have to set core.autocrlf, see http://wiki.xbmc.org/index.php?title=Git_Usage
Reply
#9
spiff Wrote:1) it's called a rebase. first add upstream repo as a remote,

git remote add upstream git://github.com/xbmc/xbmc.git

then to update you do
git fetch upstream to fetch upstream changes,

then git rebase upstream/master.

note that rebasing means rewriting history, so you need to use git push -f

2) you have to set core.autocrlf, see http://wiki.xbmc.org/index.php?title=Git_Usage

So does the "git fetch upstream" pull changes from xbmc master down to my local repo? Then what does git rebase do?

And the "git push -f" is needed to push the latest changes back up to my forked repo on github?

I think I need to read some tutorials on git, as it is a very different way of thinking about versioning I think Smile
Reply
#10
it fetches the remote. the branches on that remote is then available as upstream/<branch name>.
Reply
#11
AaronD Wrote:I think I need to read some tutorials on git, as it is a very different way of thinking about versioning I think Smile

Take a look at this: http://progit.org/book/
It helped me get away from my svn thinking and into git.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#12
you can't do any worse than me ;-) somehow my pull request became 47 different commits! Shocked
Reply

Logout Mark Read Team Forum Stats Members Help
Having difficulty with Git, trying to submi a pull request0