Hacker News new | ask | show | jobs
by vedang 5192 days ago
`The golden rule is: rebase your own stuff all day long, as much as you want. Don't rebase once you've published.`

This is a great rule of thumb, which I have had to repeatedly drill into my team-mates. The crux of the problem, I've come to realise, is that people can't differentiate between a "local" commit and a "published" commit.

Git tutorials need to focus a bit more on the nature of git than on simply showing the basic operations.

1 comments

Tell your team to add these aliases to their .gitconfig:

    [alias]
      l = log --oneline --decorate --graph
      la = log --oneline --decorate --graph --all

--online --graph : Will really help visual learners

--decorate : Makes it super obvious how labels and tags work

--all : Extends the usefulness of --decorate to branches and remotes