Skip to content

Instantly share code, notes, and snippets.

@tnaka
Forked from garaemon/git.md
Last active August 29, 2015 13:56
Show Gist options
  • Save tnaka/9245779 to your computer and use it in GitHub Desktop.
Save tnaka/9245779 to your computer and use it in GitHub Desktop.

git and github introduction and tips

gitでユーザー名を設定する

git config --global user.name hoge
git config --global user.email hoge@hoge.com

gitで他人のforkを手元に反映させる

git remote add <nickname> https://github.com/<username>/<repo>
git fetch <nickname>
git branch -a # ブランチ名の確認
git merge <nickname>/<branch-name>

一度だけmergeする分にはこちらの方が楽

git pull https://github.com/<username>/<repo> <branch-name>

emacsでgitをいい感じにつかう

magitを使いましょう. M-x magit-statusでmagit life

githubをコマンドラインから操作する

hubというものがある。 hub commandsにコマンドがたくさんのっているが、gitをhubにエイリアスしているので注意。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment