Skip to content

Instantly share code, notes, and snippets.

@tfmeneses
Last active July 11, 2024 21:11
Show Gist options
  • Save tfmeneses/a91cf1170357e5762769a9fa111023b3 to your computer and use it in GitHub Desktop.
Save tfmeneses/a91cf1170357e5762769a9fa111023b3 to your computer and use it in GitHub Desktop.
git rename commit/author message
git rebase -i HEAD~2
-> pick to edit :wq save it
git commit --amend --author="Thiago Fonseca Meneses <thiago@email>"
git rebase --continue
git push --force
# git to a new repo
cd
git checkout -b XXXX-branch
git remote add gitlab git@new.git
git push gitlab XXXX-branch
## git mirror to a different subfolders
git clone git@old.git
cd '.\X'
git init
git remote add origin git@newGitlab.git
git fetch origin
git checkout -b main origin/main
git checkout -b XXX-branch
git add .
git commit -m "XXX-branch"
git push -u origin XXX-branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment