- 前ページ
- 次ページ
ベクター画像の編集に対してAffinty designerは絶大な威力を発揮する。
Affinity designerは買い切りの画像編集ソフトウェアであり、図表と画像の編集に便利である。
筆者は、イラストレータのライトユーザーである。ライトユーザーであるがゆえ、毎日のように使うことはない。
となるとイラストレータのライセンス料は高すぎる。そんなあなたにAffity designer
ラボのデスクトップと自分のラップトップでlatex関係の文章を共同開発したい。
でも、Githubに載せるのは少し怖い。(もちろん悪いわけではないけど、データを無許可で載せたくない)
あとラボのデスクトップの動作が重めなので、Gdriveはちょっと嫌、ネット経由の共有も時間がかかる。
★Gitと外付け保存媒体(USBメモリ、HDD、SDDなど)を用いたバージョン管理をはじめよう★
まずはGitの環境を構築する。(ググる)
Gitの有無確認
$ git --version ##返答なければinstall
アカウント設定
$ git config --local user.name "[ユーザ名]"
$ git config --local user.email "[メールアドレス]" ## 他者と協同開発する場合は慎重に考える
改行コード変換無し設定 ## わかんない
$ git config --global core.autoCRLF false
次に外付け保存媒体(今回はUSB)の設定を示す
以下に手順を示す、解説コメントは##で記入した。
$ cd /Volumes/usb ## USBに移動
$ mkdir remote_repo.git ## 共有用のレポジトリを作成
$ git init --bare --share ## 空の共有レポジトリを作成
ローカルリポジトリを作成し、クローンを作る(新規メンバー、および端末に拠点をつくる。)
$ cd ..
$ cd Desktop
$ mkdir git_test
$ cd git_test
$ git remote add usb /Volumes/usb/remote_repo.git ##リモートレポジトリとしてadd
|
$ git remote -v ## 登録されたリモートレポジトリを確認 |
$ echo "README" > README.md ## READMEをつくった
$ git commit -m "first commit"
$ git push usb master ##リモートレポジトリ(USB)のmasterにプッシュ
別のlaptopにデータを受け継ぐ
$ cd Desktop
$ mkdir test
$ git clone /E/remote_repo
編集したら(my laptop)
$ git init
$ git add original.tex (git add .)
$ git commit -m "comment"
$ git remote -v
$ git remote add usb /USBdrive/remote_repo.git)
$ git push usb master
リモートレポジトリから最新版を取得するには git pull
$ cd Desktop/thesis
$ git pull usb master (when I use desktop)
$ git pull origin master (when I use laptop, confirm remote repository by git remote -v)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
そういえば、windowsにgitをinstallする手順がやや面倒だった気がする。
そちらについても備忘録をあとで書くことにする。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
○git pull がreject された
error: failed to push some refs to 'https://github.com/username/〇〇〇.git'
hint: Updates were rejected because the remote contains work that you do hint: not have locally.
This is usually caused by another repository pushing hint: to the same ref.
You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
$ git pull origin master
$ git push
○exiting because og an unresolved confrict
error: Merging is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
$ git log --oneline --graph --all でブランチの再取得、分岐を確認
$ git status 赤字で書かれているファイルがマージされてないパス
$ git add <赤字のパス>
$ git commit -m "任意"
$ git status
$ git push origin master
(2023.12.13 追記, 宣言)
今後にsource treeを使ったバージョン管理についても備忘録を書きます