git

local作業のリポジトリを共有リモートリポジトリへ移管する

git

先ずはlocalでコミットまで行う local $ git add . $ git commitremote側でpushされるリポジトリを作成 remote $ mkdir origin $ git init $ git config --bool core.bare true再びlocal側でremote登録、及びpushまで local $remote add origin ssh://user@a…

今日のgit

git

空ディレクリがコミットされてなくて、インストールでエラー。。。

branchの作成と切り替えのショートカット

git

$ git checkout -b branchnameでできる。

githubにpushでエラー

git

github1にpushしようとすると以下のエラーが出た error: failed to push some refs to 'git@github.com:myrepo' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes (e.g. 'git pull') before pushing a…

git addの操作取り消し

git

git addを取り消す $ git reset HEAD filename直前のgit commitを取り消す git commit --amend久々にgithubに上げたので。 git add filename git commit -m 'commit log' git push -u origin mastergithubのファイルを削除 git rm filename git commit -m 'c…