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

Re: git fetch,git merge and git rebase

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Feb 11, 2011, 12:32 UTC
Message-ID
<AANLkTinsBz0Yi5XXYUcaJMTvkjuhtNjotx0VWRFcKX3d@mail.gmail.com>
In-Reply-To
<4D5464E7.2010407@gmail.com>

On Fri, Feb 11, 2011 at 12:21 AM, Neal Kreitzinger <nkreitzinger@gmail.com> wrote:

Show 21 quoted lines
> On 2/9/2011 11:29 PM, Akash wrote:
>>
>> Hi,
>>
>> I am new to git .Can someone explain in simple terms what git fetch,git
>> merge and git rebase do?..I tried googling but was very confused after
>> going
>> thro it.
>>
>> Also, can someone prescribe a link which explains git in detail right from
>> scratch.
>>
>>
> another definition of git-rebase:
>
> git-rebase:  the MOST DANGEROUS command in git.  you can easily DESTROY your
> repo if you don't know what you're doing!  Until you get the hang of it,
> always make a copy of the before-image of the branch your rebasing
> (mybranch) by doing a "git checkout mybranch" and then "git branch
> copy-of-mybranch".  Then if you destroy mybranch you can recover it from
> copy-of-mybranch.

What about 'git rebase --hard', or 'git branch -D'? In all cases you can recover by using the reflog.

-- 
Felipe Contreras
Previous: AkashNext: Neal Kreitzinger
Message 10 of 11 in “git fetch,git merge and git rebase”
  1. AkashFeb 10, 2011
  2. Alexey ShumkinFeb 10, 2011
  3. Jonathan NiederFeb 10, 2011
  4. AkashFeb 11, 2011
  5. Alexey ShumkinFeb 10, 2011
  6. Neal KreitzingerFeb 10, 2011
  7. Neal KreitzingerFeb 10, 2011
  8. Jeff KingFeb 10, 2011
  9. AkashFeb 11, 2011
  10. Felipe ContrerasFeb 11, 2011
  11. Neal KreitzingerFeb 11, 2011

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.