From 242b7104587fc6bc1c4696d106ec91a6c11df54c Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Wed, 23 Feb 2022 04:03:15 -0500 Subject: [PATCH] [UPD] doc: move git doc in FAQ, add how amend several commits with no edit - doc Cherry-pick a merged commit with conflict --- doc/FAQ.md | 22 ++++++++++++++++++++++ doc/GIT_REPO.md | 8 -------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/doc/FAQ.md b/doc/FAQ.md index fc8c90e..2f86b4e 100644 --- a/doc/FAQ.md +++ b/doc/FAQ.md @@ -34,6 +34,28 @@ or sudo ss -lpnt | grep LISTEN ``` +## Git + +### Unshallow git + +By example, the repo Odoo use a depth clone. If you need all the clone repo, use this command on right directory: + +```bash +git fetch REMOTE --unshallow +``` + +### Amend several commits in Git to change author + +```bash +git rebase -i HEAD~4 -x "git commit --amend --author 'Author Name ' --no-edit" +``` + +### Cherry-pick a merged commit with conflict + +```bash +git cherry-pick -m 1 --strategy-option theirs HASH +``` + ## git-repo ### error.GitError fatal bad revision diff --git a/doc/GIT_REPO.md b/doc/GIT_REPO.md index ef67346..1dd0a04 100644 --- a/doc/GIT_REPO.md +++ b/doc/GIT_REPO.md @@ -125,11 +125,3 @@ Maybe, some version diverge from your manifest. Simply clean all and relaunch yo ```bash ./script/clean_repo_manifest.sh ``` - -### Unshallow git - -By example, the repo Odoo use a depth clone. If you need all the clone repo, use this command on right directory: - -```bash -git fetch REMOTE --unshallow -```