LoginSignup
0
0

More than 5 years have passed since last update.

gitLibとかgitよく使うコマンド

Last updated at Posted at 2016-09-16

サーバー側

cd パス/プロジェクト名.git
git --bare init

ローカル

git init
git add <filename>
git commit -m "初めてのコミット"
git remote add origin ssh://git@ホスト:パス/プロジェクト名.git
git push origin master

強制的にプルする

git fetch origin
git reset --hard origin/master

普通にプル

git pull --rebase origin master

コンフィグファイルなど、普段はpushしたくないけど、必要な時pushしたい

#設定
git update-index --skip-worktree コンフィグファイル
#設定解除
git update-index --no-skip-worktree コンフィグファイル

変更されたファイル一覧

git status
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