LoginSignup
0
1

More than 5 years have passed since last update.

GitHubメモ

Posted at

公開鍵作成

ssh-keygen -t rsa

確認

ls ~/.ssh/

任意のフォルダ初期化

git init

変更ファイルをaddするgit add --all

コミットするgit commit -m "first commit"

リモート先を確認git remote -v

プッシュgit push origin master:master


github設定確認

///////////////

GitHubへのSSH接続を確認する

$ ssh github

/////////////////////

設定を確認するには、-lオプション

git config --list
git config -l --global

コミット時のAuthorを変更

git config --global user.name ddddd
git config --global user.email assss@gmail.com

出力を色付けしてくれる設定

git config --global ui.color auto

あとは安全対策

git config --global push.default current

/////////////////////////////

ブランチ作成

git branch ブランチ名

ブランチ確認

git branch

ブランチ切り替え

git checkout ブランチ名

変更(ブランチ先にコミット)

git status
git diff
git add .
git status
git commit -m "コメント"

リモートにPush

git push origin ブランチ名

さっき作成したブランチをマージ先にマージ

git merge ブランチ名

ログ確認

git log

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