xxxxxxxxxx
# git pull request
git pull origin <name_of_the_branch_you_want_to_pull>
# example1
git pull origin main
# example2
git pull origin testBranch1
xxxxxxxxxx
#Basic command, get changes of current branch to remote repo
git pull
#When working with others, I usually stash my local changes
#before pulling in order to avoid conflict commits.
git stash
git pull
git stash pop #Reapply my local changes, eventually merge confl
xxxxxxxxxx
ga='git add'
gc='git commit'
gpsup='git push --set-upstream origin $(git_current_branch)'
xxxxxxxxxx
To avoid getting your commit and other person commit mangled up when working
on a same branch do this:
1. git pull --rebase #it will put your commit first then the other person's [linear tree]
2. If encounter merge conflict
3. git rebase --abort #revert back the changes
4. git pull #solve the merge conflicts and use this
xxxxxxxxxx
gpp='f() { ga . && gc -m $1 && gpsup && sleep 1 && gh pr create --fill };f'