LoginSignup
3
3

More than 5 years have passed since last update.

ubuntuでgithubへpushする

Posted at

linux,UbuntuにはsourcetreeやTortoiseGitなどがない。
CUIでやってみる。

# インストール
sudo apt install git

# 入ったか確認
git --version

# コミットしたディレクトリに移動してinitする
git init

# ファイルを作成
touch README

# ステージする
git add README

# コミット前の設定
git config --global user.name hogetarou
git config --global user.email hogatarou@mail.com

# メッセージを付してコミット
git commit -m 'first commit'

# githubアカウントがありリポジトリがあったらこれでpushする
git remote add origin https://github.com/hogetarou/hello_world.git
git push origin master

参考サイト
commitとpushしかできない人のためのgithubの使い方まとめ

3
3
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
3
3