git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: updating github.com forks, developing in remote branches and svn:eol-style equiv?

From
Alexander Iljin <ajsoft@yandex.ru>
Date
Mar 28, 2010, 07:25 UTC
Message-ID
<158811269761123@webmail102.yandex.ru>
In-Reply-To
<15b345f1003272332u2f4d38ear5c8aeef9b35f5037@mail.gmail.com>
Hello!
Show 12 quoted lines
> 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.
Show 8 quoted lines
>  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
Previous: Thomas AndersonNext: Thomas Anderson
Message 2 of 4 in “updating github.com forks, developing in remote branches and svn:eol-style equiv?”
  1. Thomas AndersonMar 28, 2010
  2. Alexander IljinMar 28, 2010
  3. Thomas AndersonMar 28, 2010
  4. Alexander IljinMar 28, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.