Posted on

GIT: merge vs rebase

dzone

rebase for dummies

While merging and rebasing are similar in Git, they serve two different functions. Here’s what you should know to keep your histories as clean or as complete as you like.

The git rebase command has a reputation for being magical Git voodoo that beginners should stay away from, but it can actually make life much easier for a development team when used with care. In this article, we’ll compare git rebase with the related git merge command and identify all of the potential opportunities to incorporate rebasing into the typical Git workflow.

pdf

Posted on

GIT advice

  1. Show log
    git log

    1. --author="" – print commits by pointed user
    2. --name-only – only file name
    3. --oneline – commits comments in one line
    4. --graph – commits tree
    5. --reverse – old commits before new commits
    6. --after – commits after pointed date
    7. --before – commits before pointed date

Continue reading GIT advice

Posted on

Duplicating (mirroring) a repository

To make an exact duplicate, you need to perform both a bare-clone and a mirror-push.

[code language=”java”]
git clone –bare <reponame>
# Make a bare clone of the repository

cd <reponame>
git push –mirror <newreponame>
# Mirror-push to the new repository
[/code]