1.Push a new branch
BeginnerThe setup creates a shared repository, origin.git, and a clone, me. Create a branch add-b, commit b.txt, push it with tracking, and print the branch's upstream.
git init -q --bare -b main origin.git
git clone -q origin.git me 2>/dev/null
git clone -q origin.git mate 2>/dev/null
cd me
echo "start" > a.txt
git add .
git commit -q -m "Start"
git push -q -u origin main
git -C ../mate pull -q 2>/dev/nullShow hint
git push -u origin add-b, then git rev-parse --abbrev-ref @{upstream}.
Show solution
git switch -q -c add-b
echo "b" > b.txt
git add .
git commit -q -m "Add b"
git push -q -u origin add-b
git rev-parse --abbrev-ref @{upstream}origin/add-b