git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* updating github.com forks, developing in remote branches and  svn:eol-style equiv?
@ 2010-03-28  6:32 Thomas Anderson
  2010-03-28  7:25 ` Alexander Iljin
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Anderson @ 2010-03-28  6:32 UTC (permalink / raw)
  To: git

Say on github.com I fork a repository.  Two weeks later, updates have
been made to the original repository and now I want to update my fork.
 How do I do this?

One possibility that occurs to me: I can create a new remote
repository - let's say "upstream" - with the URL of the original
repository and I can pull from that instead of the forked "origin"
repository.  I can then push the updates to the forked repository.

Is that the best way to do it, though?  It seems to me that I ought to
be able to have my github.com fork pull updates itself without my
having to pull and push with my own local repo.

Also, I'm unclear how to develop in remote branches.  If I go to the
"Switch/Checkout..." dialog I can switch to, say,
"remotes/origin/random-branch".  I do that, make some changes to one
of the new files and I then try to push those changes back.  In the
local drop down menu I only see two local branches, however - "(no
branch)" and the default branch.  Why is that?  If I just switched the
branch to, say, "remotes/origin/random-branch", shouldn't I now be
seeing that branch locally?

Finally, is there any Git equivalent to SVN's svn:eol-style and if so
how do I take advantage of it?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: updating github.com forks, developing in remote branches and svn:eol-style equiv?
  2010-03-28  6:32 updating github.com forks, developing in remote branches and svn:eol-style equiv? Thomas Anderson
@ 2010-03-28  7:25 ` Alexander Iljin
  2010-03-28 17:07   ` Thomas Anderson
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Iljin @ 2010-03-28  7:25 UTC (permalink / raw)
  To: git; +Cc: Thomas Anderson

Hello!

> Say on github.com I fork a repository.  Two weeks later, updates have
>  been made to the original repository and now I want to update my fork.
>   How do I do this?
>  
>  One possibility that occurs to me: I can create a new remote
>  repository - let's say "upstream" - with the URL of the original
>  repository and I can pull from that instead of the forked "origin"
>  repository.  I can then push the updates to the forked repository.
>  
>  Is that the best way to do it, though?  It seems to me that I ought to
>  be able to have my github.com fork pull updates itself without my
>  having to pull and push with my own local repo.

  You should do it the way you described - via local repository, because you
  might need to resolve conflicts along the way.
  There is the "Fork Queue" feature on GitHub, you may give it a try.

>  Also, I'm unclear how to develop in remote branches.  If I go to the
>  "Switch/Checkout..." dialog I can switch to, say,
>  "remotes/origin/random-branch".  I do that, make some changes to one
>  of the new files and I then try to push those changes back.  In the
>  local drop down menu I only see two local branches, however - "(no
>  branch)" and the default branch.  Why is that?  If I just switched the
>  branch to, say, "remotes/origin/random-branch", shouldn't I now be
>  seeing that branch locally?

  To have a local branch you should create it:
  git checkout -b branchName remotes/origin/branchName
  Remote branches are there only to track the state of the remote repo,
  you should only commit to local branches and then push your work to
  remotes.

>  Finally, is there any Git equivalent to SVN's svn:eol-style and if so
>  how do I take advantage of it?

  git help config
  Look for "autocrlf", "safecrlf", etc.
  You can set these options globally or per repository.

---=====---
 Alexander

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: updating github.com forks, developing in remote branches and  svn:eol-style equiv?
  2010-03-28  7:25 ` Alexander Iljin
@ 2010-03-28 17:07   ` Thomas Anderson
  2010-03-28 17:42     ` Alexander Iljin
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Anderson @ 2010-03-28 17:07 UTC (permalink / raw)
  To: Alexander Iljin; +Cc: git

On Sun, Mar 28, 2010 at 2:25 AM, Alexander Iljin <ajsoft@yandex.ru> wrote:

>  You should do it the way you described - via local repository, because you
>  might need to resolve conflicts along the way.
>  There is the "Fork Queue" feature on GitHub, you may give it a try.

In playing around with their Fork Queue feature...  I have a week old
fork to which I've made no changes.  I do "Select All" for al the
changes in teh original fork and then select "Apply" in the drop down
"Actions" menu.  It then just sits there doing nothing.  It says
"Status: Processing 1 of 8 Commits" and that's it.  Shouldn't it
actually be doing something?

>  To have a local branch you should create it:
>  git checkout -b branchName remotes/origin/branchName
>  Remote branches are there only to track the state of the remote repo,
>  you should only commit to local branches and then push your work to
>  remotes.

I think I figured out some of my confusion - there's a "Create New
Branch" checkbox in the "Checkout\Switch" dialog that needs to be
checked that isn't by default.  I guess the idea is that, by default,
TortoiseGit assumes you want to make the branch you checkout the
default branch?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: updating github.com forks, developing in remote branches and  svn:eol-style equiv?
  2010-03-28 17:07   ` Thomas Anderson
@ 2010-03-28 17:42     ` Alexander Iljin
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander Iljin @ 2010-03-28 17:42 UTC (permalink / raw)
  To: Thomas Anderson; +Cc: git

Hello!

TA> In playing around with their Fork Queue feature...  I have a week old
TA> fork to which I've made no changes.  I do "Select All" for al the
TA> changes in teh original fork and then select "Apply" in the drop down
TA> "Actions" menu.  It then just sits there doing nothing.  It says
TA> "Status: Processing 1 of 8 Commits" and that's it.  Shouldn't it
TA> actually be doing something?

  Last time I tried it, it said that I'll have conflicts, even though
  it was clearly a fast-forward situation. I think that either the
  feature is not production-ready, or I am severely missing something.
  I don't know the current situation, that's why I suggested you give
  it a try.

TA> I think I figured out some of my confusion - there's a "Create New
TA> Branch" checkbox in the "Checkout\Switch" dialog that needs to be
TA> checked that isn't by default.  I guess the idea is that, by default,
TA> TortoiseGit assumes you want to make the branch you checkout the
TA> default branch?

  I don't use TGit. Previous version used to hang its cache process,
  consuming 100% CPU. After once restarting it 3 times in 10 minutes I
  got rid of it. Didn't have time to give the latest version a try.
  I like the idea, and the GUI looks very usable, but I guess the
  implementation is pretty sloppy. Unlike TSvn, which is great.

  I'm using msysgit with gitk and git gui (in previous version
  git gui didn't show diffs, but the latest works almost fine).

---=====---
 Alexander

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-28 17:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-28  6:32 updating github.com forks, developing in remote branches and svn:eol-style equiv? Thomas Anderson
2010-03-28  7:25 ` Alexander Iljin
2010-03-28 17:07   ` Thomas Anderson
2010-03-28 17:42     ` Alexander Iljin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).