0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

git メモ

Last updated at Posted at 2019-10-08

便宜上
リモートリポジトリ→remote
ローカルリポジトリ→local

cmd

コマンド 内容
clone remoteをマウント
remote -v remote確認
branch localブランチ作成
push local→remote
pull remote→local
stash local変更退避

よく使う流れ

branchにmaster情報反映

最新情報取得

git pull origin master

branch切り替えて

git rebase master

localのcommit取消

該当commitのIDを確認して

git log

ID指定して削除

git reset --hard <commitId>

local branch 削除

参照

困った時

failed to push some refs to

rebertして整合性がおかしくなってpushできない時

error: failed to push some refs to  'リポジトリパス'

こんなエラーが出たら

git push origin :<branch name>

で解決
ただしlocalが正のときに限る

rebase-apply

なんかrebase出来ない

It seems that there is already a rebase-apply directory, and
I wonder if you are in the middle of another rebase.  If that is the
case, please try
        git rebase (--continue | --abort | --skip)
If that is not the case, please
        rm -fr "hoge/fuga/rebase-apply"
and run me again.  I am stopping in case you still have something
valuable there.

要するに「rebase-apply」ってfolderあるから出来ねーよ
って言われているので該当フォルダを消して再度通すと出来ます。
たぶん処理中にハングアウトしたとかそーゆーので残ると起こり得る

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?