2022_11_18_linuxでの個人用gitの設定

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
2022_11_18_linuxでの個人用gitの設定 [2022/12/09 05:28] 133.11.50.1632022_11_18_linuxでの個人用gitの設定 [Unknown date] (現在) – 削除 - 外部編集 (Unknown date) 127.0.0.1
行 1: 行 1:
-conda環境の立ち上げ 
- 
-  conda activate mizo_python 
- 
-gitのインストール 
- 
-  conda install -c bioconda git 
-   
-git configの設定。ユーザー名、メアドを登録し、改行コードの自動変換をオフにする。pull/pushのデフォルトをfast-forwardにし、fast-forwardできないときには失敗するように設定。(要勉強) 
- 
-  git config --global user.name mizobata.hideaki 
-  git config --global user.email mizobata.hideaki@gmail.com 
-  git config --global core.autocrlf false 
-  git config pull.ff only 
-   
-github上でリモートリポジトリを作成。今回はlocal blast server用のリモートリポジトリを作成。 
- 
-ブラウザ版githubにログイン→右上のアイコン→Repositories→Newから作成。今回のリポジトリ名は```Local_blast_server```。 
- 
-アクセストークンを作成。これはgit pushするときにパスワード代わりに必要となる。 
- 
-ブラウザ版github→settings→developer settings→personal access tokens→Tokens(classic)→generate new token→repoにチェック 
- 
-今回作ったtokenは```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``` 
- 
-ローカルブラストサーバーのディレクトリに移動。(m768.sにて) 
- 
-  cd /home/mizobata.hideaki/local_blast_server 
- 
-gitの初期化。現在のディレクトリをgit管理下に置く。 
- 
-  git init 
- 
-リモートリポジトリとローカルリポジトリの紐付け。github上のリモートリポジトリ```local_blast_server```を```origin```として登録。 
- 
-  git remote add origin https://github.com/hmizobata/local_blast_server.git 
- 
-ディレクトリ内のファイルをすべてステージング 
- 
-  git add -A 
- 
-ブランチの作成 
- 
-  git branch -M main 
- 
-更新(今回はなにもないところにスクリプトを追加)をコミット(-mオプションでメモを残せる) 
- 
-  git commit -m "first commit" 
-  
-pushする前にリモート(origin)からローカル(main)にpullして同期する。 
- 
-  git pull origin main 
- 
-エラーが出た場合、fast-forwardができないような更新の構造になっているため、臨機応変に対応する。今回は--rebaseで対応。[[このサイト|https://kray.jp/blog/git-pull-rebase/]]がわかりやすい? 
- 
- 
  
  • 2022_11_18_linuxでの個人用gitの設定.1670563696.txt.gz
  • 最終更新: 2022/12/09 05:28
  • by 133.11.50.163