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

Re: master and origin

From
LTLuben Tuikov <ltuikov@yahoo.com>
Date
Oct 29, 2006, 23:19 UTC
Message-ID
<118164.43697.qm@web31807.mail.mud.yahoo.com>
In-Reply-To
<4d8e3fd30610291329n7fe59873r87cbee9ccbd4b720@mail.gmail.com>
--- Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> wrote:
Show 8 quoted lines
> 
> So in this case, there is a difference between doing my local
> development under master or myownlocalbranch. Right?
> I mean, if I do my own development under master and I pull, the master
> branch will include origin and my local changes. Corret?
> While if I work in my local branch the datas are not modified with a
> pull, because pull will update only the local copy of the remote
> branch. Correct?

Following GIT's working flow isn't that much different than other SCM's workflow.

Leave master and origin branches alone. Imagine they are your local copy of that imaginary "root" repo.

If you want to do development, create your own branch off of master at some point, say HEAD, using git-branch, call it my-branch.

Then do your development in my-branch, occasionally pulling from master, all the while you update master on a regular basis from the remote repo. That pull into my-branch would schedule the merge for you and if it cannot auto-merge, it will leave it up to you do _resolve_ and then commit. Eventually you get into the habit of following the same commands in the same steps.

Note the key words here: pull, merge, commit. Pull and merge is is done by git-pull, and if there's things to resolve you do that manually, in most simplistic ways.

If you're coming from another SCM, picking up git is a snap. I think the only "hurdle" coming from another SCM especially centralized is the decentralized nature of git.

Reading git-fetch, git-pull documentation very carefully should clear things up.

     Luben
Previous: Jakub Narebski
Message 7 of 7 in “master and origin”
  1. Paolo CiarrocchiOct 29, 2006
  2. Jakub NarebskiOct 29, 2006
  3. Luben TuikovOct 29, 2006
  4. Jakub NarebskiOct 29, 2006
  5. Paolo CiarrocchiOct 29, 2006
  6. Jakub NarebskiOct 29, 2006
  7. Luben TuikovOct 29, 2006

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.