LoginSignup
1
0

More than 3 years have passed since last update.

Gitのconfigの設定、ローカルからリモートへのpush

Posted at

ローカル環境のコマンドライン上でgitリポジトリを作成した際に
設定し忘れることがあるのでメモっておく。

  • Author、Commiterの設定
$ git config --local user.name "Name"
$ git config --local user.email "Email"
  • gitのAuthor、Commiterの変更
$ git filter-branch -f --env-filter "GIT_AUTHOR_NAME='Name' GIT_AUTHOR_EMAIL='Name' GIT_COMMITTER_NAME='Name' GIT_COMMITTER_EMAIL='Email'" HEAD
  • ローカルで作成したリポジトリからリモートへのpush
  1. githubでリモートリポジトリを作成する
  2. 以下のコマンドでリモートにpushする
$ git remote add origin https://github.com/リモートリポジトリ
$ git push -u origin master

git remote add origin https://github.com/リモートリポジトリ
このコマンドでローカルとリモートを関連付ける

1
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
1
0