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

Re: a few beginner git questions

From
AWAllan Wind <allan_wind@lifeintegrity.com>
Date
Mar 6, 2010, 07:01 UTC
Message-ID
<20100306070150.GB14424@lifeintegrity.com>
In-Reply-To
<15b345f1003052242r7d812fe4q6ade253283696304@mail.gmail.com>
On 2010-03-06T00:42:40, Thomas Anderson wrote:
> 1. When do you commit changes and when do you stage changes?  Or maybe
> more to the point, what's the difference between doing "stage, commit,
> stage, commit" and "stage, stage, commit"?

The former gives you one commit and the latter two comments. Staging (git add) is local while commits can shared with others (git push).

> 2. What's the difference between merging and pushing?  In CVS, you
> merge code by manually adding changes.  ie. the CVS client doesn't do
> the merging - you do.  Yet in Git Gui, there's a Merge menu button, as
> if it's now supposed to be somehow automated?

pushing is how you copy the data to another repository while merging is integrating multiple versions in into a single new version.

> 3. Creating branches in Git Gui is easy enough but it's unclear to me
> how to switch back to the trunk once you've created a branch.
git checkout master (which is the default name for "trunk")
<http://git.wiki.kernel.org/index.php/GitFaq#How_do_I_access_other_branches_in_a_repository.3F>
Show 7 quoted lines
> 4. I clone git://github.com/symfony/symfony.git to c:\git\test\root
> and clone that to c:\git\test\clone.  I then blank
> c:\git\test\clone\README, stage it, commit it and push it and the
> change does not appear in c:\git\test\root\README.  I then reopen Git
> Gui and open root and there I see the blanked README as an uncommited
> state change.  I commit it and the change still does not appear in
> c:\git\test\root\README.  Is this what Git should be doing?
<http://git.wiki.kernel.org/index.php/GitFaq#Why_won.27t_I_see_changes_in_the_remote_repo_after_.22git_push.22.3F>
/allan
-- 
Allan Wind
Life Integrity, LLC
<http://lifeintegrity.com>
Previous: Thomas AndersonNext: Tait
Message 2 of 9 in “a few beginner git questions”
  1. Thomas AndersonMar 6, 2010
  2. Allan WindMar 6, 2010
  3. TaitMar 6, 2010
  4. Thomas AndersonMar 7, 2010
  5. Dmitry PotapovMar 7, 2010
  6. Thomas AndersonMar 7, 2010
  7. Dmitry PotapovMar 7, 2010
  8. TaitMar 8, 2010
  9. Junio C HamanoMar 7, 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.