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,github関係の個人的メモ

Last updated at Posted at 2016-10-13

気になることがあるたびに調べるのめんどくさいからよく使いそうなことのメモ
なんかあったら随時更新

#github上のファイルを削除したいとき
多分若干違う...

状態の確認
$git status

履歴の削除
$git rm --cached [statusで得られた削除したいファイルのパス]

.gitignoreに使わないファイルのパスを記述
$vi .gitignore

反映
$git commit -m "削除"
$git push origin master

以下,参考にしたサイト
http://yatta47.hateblo.jp/entry/2015/05/07/003000
http://am1tanaka.hatenablog.com/entry/2015/07/08/173643
http://qiita.com/go_astrayer/items/6e39d3ab16ae8094496c

#github上でリポジトリを移動したいとき
あらかじめ,移動先に空のファイルを作成しておく.

$git clone --mirror [移動元リポジトリURL]
$cd [~.git]
$git push --mirror [移動先リポジトリURL]

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?