git
git notes
Set a local repo or global username
git config --local user.name "fox"
git config --local user.email "fox@localhost"
git config --global user.name "foxhop"
git config --global user.email "foxhop@foxhop.net"How to push to remote master
if this is your first commit/push:
else:
Basic github workflow
- upstream
-
original remote github repo, read-only
only way to change this repo is to ask for a merge using a pull-request
- origin
-
forked remote github repo, read-write
push you changes here and perform pull requests
- local
-
cloned local, read-write
make changes and push to origin
pull changes from upstream, perform merges and fast forwards to keep sync'd
example using salt repo
create a remote fork on github
press the fork button when logged in
clone the remote fork to your local host
make some changes to source code and push to remote origin (your github fork)
perform a pull-request using github gui
- Go on vacation for 1 week
-
Your local and origin repos now appear out-of-date. Sync them by performing a fast-forward or merge with upstream.
Tell your local repo about the upstream repo
view all branches
git branch -a * develop remotes/origin/0.11 remotes/origin/0.12 remotes/origin/0.13 remotes/origin/HEAD -> origin/develop remotes/origin/develop remotes/origin/master remotes/origin/no_ipv6 remotes/upstream/0.11 remotes/upstream/0.12 remotes/upstream/0.13 remotes/upstream/develop remotes/upstream/master remotes/upstream/no_ipv6sync local with remote upstream
push local to remote origin
Remarkbox
Comments