- 追加された行はこのように表示されます。
- 削除された行は
このように表示されます。
Git の使い方
!!クローン
git clone git://repo.or.cz/Ale.git
git clone git://git.savannah.gnu.org/gnulib.git
!!PULL
git pull git://repo.or.cz/Ale.git
git pull git://git.savannah.gnu.org/gnulib.git
! PROXY
git config --global http.proxy http://[proxy]:[port]
git config --global http.proxy http://192.168.1.21:8080
git config --global -l
> cat ~/.gitconfig
[user]
name = Your Name
email = you@example.com
[http]
proxy = http://192.168.1.21:8080
https://qiita.com/ryotaro76/items/0e40ffb6173b1580e671
! error: Your local changes to the following files would be overwritten by merge:
> git checkout .
> git pull
or
git stash save -u // 変更内容を一時待避
git stash pop //一時退避を元にもどす
git stash list //一時退避の確認
git stash clear//一時退避の消去
or
git fetch origin master
git reset --hard origin/master
submodule の場合
git submodule update --init --recursive
or
> git submodule foreach git pull origin master
> or
> git submodule foreach git reset --hard origin/master
> or
> git submodule foreach git stash save -u
> git submodule foreach git stash pop
> git submodule foreach git stash clear
> // git submodule foreach
! 強制リセット
## 1) リモートの最新を取ってきて・・
$ git fetch origin master
## 2) masterを、リモートのmasterに強制的に
$ git reset --hard origin/master
!Appendix
http://www8.atwiki.jp/git_jp/