「Debian活用/その他」の版間の差分
< Debian活用
ナビゲーションに移動
検索に移動
(→状態確認) |
(→書き換え) |
||
(同じ利用者による、間の8版が非表示) | |||
42行目: | 42行目: | ||
=== branch === |
=== branch === |
||
<nowiki> |
|||
git checkout -b test main |
git checkout -b test main |
||
git push -u origin test |
git push -u origin test |
||
git commit -m "" |
git commit -m "" |
||
</nowiki> |
|||
=== 状態確認 === |
=== 状態確認 === |
||
52行目: | 54行目: | ||
status |
status |
||
show |
show |
||
git diff --name-only --cached |
|||
git diff ID |
|||
git log |
|||
</nowiki> |
|||
=== patch === |
|||
<nowiki> |
|||
git format-patch --start-number NUMBER ID |
|||
git apply --check 0001-test.patch |
|||
patch -p1 < 0001-test.patch |
|||
</nowiki> |
</nowiki> |
||
58行目: | 74行目: | ||
<nowiki> |
<nowiki> |
||
$ git commit --amend |
$ git commit --amend |
||
$ git rebase -i HEAD~n |
|||
pickをeditに変更する |
|||
git commit --amend -s -m "" |
|||
git rebase --continue |
|||
git stash -u |
|||
git stash list |
|||
git stash apply stash@{0} |
|||
git stash apply stash@{0} --index |
|||
git stash drop stash@{0} |
|||
</nowiki> |
</nowiki> |
||
<nowiki> |
<nowiki> |
||
$ git reset --soft HEAD^ |
|||
$ git reset --hard HEAD^ |
|||
$ git reset HEAD FILENAME |
|||
$ git checkout HEAD FILENAME |
|||
$ git rm --cached -r FILENAME |
|||
$ git revert HEAD |
|||
$ git log --pretty=full |
$ git log --pretty=full |
||
2024年7月10日 (水) 07:12時点における最新版
yaskkserv(サーバを1つに) squid webDAXSV LDAP docker Clamav vscode emacs scp -P XXX -i id_XXX XXX.txt XXX@XXX: Debian Backports Debian Fast Track chroot qemu-arm qemu-user-static debootstrap xxd vim emacs SpamAssassin s/mime DKIM voicevox apparmor smartmontools badblocks fsck quilt
git
初期設定
$ git config --global user.name "user" $ git config --global user.email "user@example.com" $ git config --global pull.rebase false
$ git config --global color.ui = auto git config --global url.https://example.com/.insteadOf git@example.com: git config --global --add url.https://example.com/.insteadOf ssh://git@example.com/
branch
git checkout -b test main git push -u origin test git commit -m ""
状態確認
status show git diff --name-only --cached git diff ID git log
patch
git format-patch --start-number NUMBER ID git apply --check 0001-test.patch patch -p1 < 0001-test.patch
書き換え
$ git commit --amend $ git rebase -i HEAD~n pickをeditに変更する git commit --amend -s -m "" git rebase --continue git stash -u git stash list git stash apply stash@{0} git stash apply stash@{0} --index git stash drop stash@{0}
$ git reset --soft HEAD^ $ git reset --hard HEAD^ $ git reset HEAD FILENAME $ git checkout HEAD FILENAME $ git rm --cached -r FILENAME $ git revert HEAD $ git log --pretty=full $ git filter-branch -f --env-filter ' if [ "$GIT_COMMITTER_EMAIL" = "user1@example.com" ]; then GIT_COMMITER_NAME="user2"; GIT_AUTHOR_NAME="user2"; GIT_COMMITER_EMAIL="user2@example.com"; GIT_AUTHOR_EMAil="user2@example.com"; fi' $ git push -f