Live data from Hacker News

A list of cool features of Git and GitHub

github.com

21–26 of 26 posts

Re: A list of cool features of Git and GitHub

#21

> To add more color to your Git output: git config --global color.ui 1 Don't do this. The default (since 1.8.4) is auto, which adds colors if the output goes to a terminal, but doesn't if the output goes somewhere else (e.g., a pipe). That is probably what you want (and already have). I fell for this myself at some point. Somehow expecting there to be more colors, or full color support, or something like that — Nope.

Better yet, if you just want to get to work and have a sexy terminal, use https://github.com/mathiasbynens/dotfiles

To install on Mac just run:

    git clone https://github.com/mathiasbynens/dotfiles.git && cd dotfiles && source bootstrap.sh

Re: A list of cool features of Git and GitHub

#22
post #6

Any way how to automatically mirror an external Git repo to GitHub? Any webhooks for that?

The point of git is, that you do not need to do this. Just push.

It's somewhat useful as poor man's backup, since forgetting to push to the other remote would be a pretty human thing to do. I guess you could do some kind of bash alias to push both remotes, but that would also assume that both are available from your network location (not sure if Git can have n remotes with one push alias).

Re: A list of cool features of Git and GitHub

#25
post #6

Any way how to automatically mirror an external Git repo to GitHub? Any webhooks for that?

The point of git is, that you do not need to do this. Just push.

There's a slight difference between a git push and a full mirror operation. A git push only synchronises the current branch. Even git push --all doesn't necessarily push all reachable commits - tags, other named refs (eg. stash), the state of the reflog...

Re: A list of cool features of Git and GitHub

#26
post #12

> The first commit of a repo, as the first commit cannot be rebased later Hey, can't I git rebase --root?

You can, but it's still a good idea to avoid as it tends to confuse some tools (and some people).

Ya, I agree. But if you are rebasing I assume you know what you are doing.

More like a shouldn't (or really shouldn't if you will) than cannot.

Post reply on HN