Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kyu999/2d38ed992e919ee1e8f8 to your computer and use it in GitHub Desktop.
Save kyu999/2d38ed992e919ee1e8f8 to your computer and use it in GitHub Desktop.
gitで変な変更がpush時に混ざった原因
git branchを切ったらそのbranchは現在のbranchから切られることになるので、必ずdevelopmentからbranchを作る。
developmentがlocalにない場合は
```
git checkout -b development origin/development
```
これでローカルにdevelopmentを作る。引数の -b はbranchを切りつつcheckoutをするということ。
addしてしまったものをいったん横においておきたいときは
```
git stash save
```
でわきにおいておくことができる。
save一覧は
```
git stash list
```
で見る
もしその脇に置いた変更をもとに戻したいときは
```
git stash pop
```
で最新のstashを現在のbranch上に移動できる
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment