Search code examples
gitbranchtagginggit-mergegit-bare

Understanding git tagging, rebasing and bare repos


In git:

  1. Do you tag branches or repos?
  2. When you tag a branch/repo, are you only tagging the changes that are fully committed, or do you also tag changes that have been added/staged?
  3. Under what circumstances would ever need to rebase a branch? Doesn't merge give you everything you need?
  4. What is a "bare" repository? How is it opposed to a "non-bare" repo?

Thanks in advance!


Solution

  • To (briefly) answer your questions...

    1. You tag commits, see here: Git - Tagging
    2. See above
    3. merge vs rebase is well discussed in this question
    4. A bare repository in Git just contains the versioning info that's stored in the .git directory within a normal repo. Try it yourself git init --bare bare; ls -la bare

    As other has suggested, read up on Git:

    I recommend Git SCM and especially the Git Book for getting started.