Commit b240b4487522a08e25a9a1f5b299314dd164c4e4

Add `git enslave` alias
To be used if upstream suddenly renamed master branch.
Author: xaizek
Author date (UTC): 2023-10-21 11:53
Committer name: xaizek
Committer date (UTC): 2023-10-21 11:54
Parent(s): e4ccd58d33cf391181bad6ccbf5cf31cbf4c2974
Signing key: 99DC5E4DB05F6BE2
Tree: 3da32cc53d6c310f8e8212c4bd641de0a29f678e
File Lines added Lines deleted
gitconfig 14 0
File gitconfig changed (mode: 100644) (index 16a6387..3051404)
27 27 append = commit -v --amend -C HEAD append = commit -v --amend -C HEAD
28 28 fix = !vim $(git-ls-files --unmerged | cut -f2 | uniq) fix = !vim $(git-ls-files --unmerged | cut -f2 | uniq)
29 29 pend = log origin/master..HEAD pend = log origin/master..HEAD
30 # to be used if upstream suddenly renamed master branch
31 enslave = !run() { \n\
32 if [ -z "$1" ]";" then \n\
33 echo 'error: remote name must be provided as an argument' \n\
34 return 1 \n\
35 fi \n\
36 if [ "$#" -gt 1 ]";" then \n\
37 echo 'error: expected only one argument' \n\
38 return 1 \n\
39 fi \n\
40 git config --local --add "remote.$1.fetch" "+refs/heads/main:refs/remotes/$1/master" \n\
41 git config --local --add "remote.$1.push" refs/heads/master:refs/heads/main \n\
42 git config --local branch.master.merge refs/heads/main \n\
43 } && run
30 44
31 45 [color] [color]
32 46 # enable coloring of git output # enable coloring of git output
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/dotfiles

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/dotfiles

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master