mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore: import notes from an old repository
This commit is contained in:
@@ -1,7 +1,43 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
git init --initial-branch 'main'
|
||||
|
||||
git config --get 'init.defaultBranch'
|
||||
git config -C 'repos/test' --get 'init.defaultBranch'
|
||||
|
||||
git config --local 'user.email' 'example.user@gmail.com'
|
||||
git config --local 'user.name' 'Example User'
|
||||
git config --local 'user.signingkey' 'ABCDEF01'
|
||||
git config --local 'commit.gpgsign' true
|
||||
git config --local 'pull.rebase' false
|
||||
|
||||
git clone --recurse-submodules 'git@github.com:example/ansible-role-keychron-capable.git'
|
||||
|
||||
git branch --list --remote 'origin/*' | cut -d/ -f2
|
||||
|
||||
git pull
|
||||
git pull 'gitlab' 'main'
|
||||
|
||||
git add '.'
|
||||
git add -p '.gitignore'
|
||||
|
||||
git commit --message 'feat: initial commit'
|
||||
|
||||
git push --set-upstream 'origin' 'feat/add-soap'
|
||||
|
||||
git remote add 'github' 'git@github.com:example/ansible-role-keychron-capable.git'
|
||||
git remote add 'gitlab' 'git@gitlab.com:sample/ansible-role-keychron-capable.git'
|
||||
|
||||
git remote set-url --push --add 'origin' 'git@github.com:example/ansible-role-keychron-capable.git'
|
||||
|
||||
git remote | xargs -n 1 git push
|
||||
|
||||
git lfs pull
|
||||
|
||||
|
||||
##
|
||||
# Remove files from the latest commit.
|
||||
# --------------------------------------
|
||||
# The easiest way is to use `git gui`: 'Commit' => 'Amend Last Commit' => uncheck the files => 'Commit'.
|
||||
##
|
||||
|
||||
@@ -12,6 +48,7 @@ git commit -c ORIG_HEAD
|
||||
|
||||
##
|
||||
# Change the default branch from 'master' to 'main'.
|
||||
# --------------------------------------
|
||||
# Source: https://stevenmortimer.com/5-steps-to-change-github-default-branch-from-master-to-main/
|
||||
##
|
||||
|
||||
|
||||
Reference in New Issue
Block a user