forked from eclipse-collections/eclipse-collections
-
Notifications
You must be signed in to change notification settings - Fork 0
Initial git setup
Craig P. Motlin edited this page May 20, 2016
·
2 revisions
https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup
# Your name, however you'd like it to appear
git config --global user.name "John Doe"
# Your email address, exactly matching the one used to sign the Eclipse CLA
git config --global user.email johndoe@example.com
# Replace vim with your favorite editor
git config --global core.editor vim
https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.br branch
git config --global alias.unstage 'reset HEAD --'
git config --global alias.last 'log -1 HEAD'
git config --global alias.cp 'cherry-pick'
git config --global alias.ss 'status -s'
git config --global alias.ri 'rebase --interactive --autosquash'
git config --global alias.l 'log --oneline --graph --decorate --all'
git config --global alias.ll 'log --oneline --graph --decorate'
git config --global alias.f 'fetch --all --prune'
git config --global alias.gl "log --graph --decorate --date=short --format=format:'%C(yellow)%h%C(reset) %C(blue)%ad%C(reset)%C(auto)%d%C(reset) %C(normal)%s%C(reset) %C(magenta)%an%C(reset)'"
git config --global alias.ga "log --graph --decorate --date=short --format=format:'%C(yellow)%h%C(reset) %C(blue)%ad%C(reset)%C(auto)%d%C(reset) %C(normal)%s%C(reset) %C(magenta)%an%C(reset)' --all"
git config --global alias.l "log --graph --decorate --date=short --format=format:'%C(yellow)%h%C(reset) %C(blue)%ad%C(reset)%C(auto)%d%C(reset) %C(normal)%s%C(reset) %C(magenta)%an%C(reset)' --all"
git config --global alias.gb "log --graph --decorate --date=short --format=format:'%C(yellow)%h%C(reset) %C(blue)%ad%C(reset)%C(auto)%d%C(reset) %C(normal)%s%C(reset) %C(magenta)%an%C(reset)' --branches"
git config --global alias.m 'mergetool --no-prompt --tool=vimdiff'
git config --global alias.detach 'checkout --detach'
git config --global branch.autosetuprebase always
git config --global branch.autosetupmerge always
git config --global push.default simple
git config --global rerere.enabled true
https://github.com/eclipse/eclipse-collections
Click fork
git clone https://github.com/<username>/eclipse-collections
git config remote.pushdefault origin
git config push.default current
git remote add upstream git@github.com:eclipse/eclipse-collections.git
git fetch --all
If you want to fetch pull request commits locally before they are pulled, edit .git/config
to add this last line to the upstream
section.
[remote "upstream"]
url = https://github.com/eclipse/eclipse-collections.git
fetch = +refs/heads/*:refs/remotes/upstream/*
fetch = +refs/pull/*:refs/remotes/upstream/pr/*