How to push changes to OWN fork?
#1
Hey,

First off all - it's not like I've not worked with Git before, I worked on the Duckbox project for my (old) satellite receiver before. However, difference is that all went to the MAIN git and not to any fork.

So now I goofed up and my "git commit -a" went to the MAIN XBCM Git. Sorry... I noticed that and fixed it.

Now, I want to do it the PROPER way. Yes, I have checked http://wiki.xbmc.org/index.php?title=Git_Usage

I have cloned my own fork, config file in .git shows this:
Code:
[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = [email protected]:MichaelAnders/xbmc.git
[branch "master"]
    remote = origin
    merge = refs/heads/master
[merge]
    log = true

So the origin seems to be fine.

So then I assumed that "git commit -a" would push this into my fork and not into the master. That was wrong, but then I really do not see any "how to commit" section there. The only one is about pushing so I did it how I expected it would work.

How do I do that properly? How do I tell git "push this locally changed code into MY fork" so that I can let you guys look at it and then decide to push it into MAIN?

Thanks and sorry again Sad

Reply
#2
git commit -a doesn't go anywhere except into your local repo. git log will show your commit on top.

Further, even if you did attempt to push to XBMC's repo it would deny you access anyway Smile

Your origin is your fork by the looks, so git push origin master will go there.

There are 3 rules when pushing:

1. ALWAYS specify the repository and branch you are pushing (i.e. never just "git push") - this way you always know when you screw up :p
2. NEVER force push to anything except your own repository, and only do that to branches you own that no one else is actively following.
3. See 2.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
And even if push permissions are granted, there are clear team rules on when pushing is allowed, and for what types of changes - for master everything has to be exactly right or the unlucky dev is beaten senseless behind the wood-shed. Pull requests are your friend.

Trust one who has made the mistake Wink
System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon  AVR-3808CI  - Denon DVD-5900 Universal Player  - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray  - X-Box 360  - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
Reply
#4
(2012-05-17, 09:40)jmarshall Wrote: git commit -a doesn't go anywhere except into your local repo. git log will show your commit on top.

Further, even if you did attempt to push to XBMC's repo it would deny you access anyway Smile

Your origin is your fork by the looks, so git push origin master will go there.
Thanks! This is what I assumed - but I was "shocked" when I saw that my code was in xbmc/xbmc. I guess it was still in my fork, I just didnt see that part...

Ok, great then, thanks guys Smile
Reply

Logout Mark Read Team Forum Stats Members Help
How to push changes to OWN fork?0