git

Git で local branch を別名の remote branch に push する

git

$ git push origin local_branch:remote_branchローカルに heroku push 用の heroku ブランチを用意していた場合、デプロイはローカルの heroku ブランチを heroku/master に push する必要がある。 別名で push する方法をいつも忘れて "heroku/master" っ…

Cannot apply to a dirty working tree, please stage your changes

git

$ git stash show -p | git apply && git stash drop無理やり解決してる感あるけど、よしhttp://stackoverflow.com/questions/1360712/git-stash-cannot-apply-to-a-dirty-working-tree-please-stage-your-changes

リモートブランチが削除できない><

リモートブランチを削除しようとしたら、以下のように怒られた。 $ git push origin :makimoto *** Deleting a branch is not allowed in this repositoryCannot delete remote branch in git - Stack Overflow によると、これは、中央リポジトリの設定によ…

git で編集したファイルを元に戻す

git checkout -- <file></file>