Re: Pushing to GitHub doesn't push all branches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael J Gruber wrote:

Please don't! That's what we're here for ;)

:) Thanks.


git for-each-ref --shell --format="git push -f origin :%(refname)"
refs/remotes/|while read line; do eval $line;done

OK, done this. 'git ls-remote github' doesn't show any remotes/* references anymore.

Oh by the way, I followed your advice and renamed 'origin' to 'github' so it makes a bit more sense. I used the following command:

  $ git remote rename origin github



git config remote.origin.push '+refs/remotes/*:refs/heads/*'

OK, I've done this, but I'm not 100% sure what this means. This is what I think (from reading various git help and users guide). Any branches I have which track remote references (from svn repository) will be pushed to github as various head references (normal branches). Is this correct?

On our server, which contain the svn cloned repository and the one that is only used for syncing svn -> our server -> github, I had to add a new commit which represents the svn-ignore meta data to a .gitignore file. I noticed I had to manually to a 'git checkout master' & 'git merge remotes/trunk' to pull in new updates. I thin pushed that to github.

So what is my twice hourly cron script supposed to look like? Is the following still ok?

========[ script executed by cron every 30 minutes ]============
#!/bin/sh
GIT="/usr/local/bin/git"

# FPC repository
cd /mnt/samba/git/fpc.git/
$GIT checkout master
$GIT svn fetch
$GIT gc --auto
$GIT push github master
==============================

Or do I need to add a new line after '$GIT svn fetch' that does a merge.

==============================
$GIT svn fetch
$GIT merge remotes/trunk
...
push to github
==============================


Also what do I do with the other branch I want to track. It's called remotes/fixes_2_2.

I believe I need to first create a local branch.

  git branch --track fixes_2_2 remotes/fixes_2_2

What do I need to modify in my cron script to keep both the master & fixes_2_2 branches in sync with SubVersion and push both to GitHub. I want Github to show two branches: master & fixes_2_2



Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]