User Tools

Site Tools



set url and ssh keys to push using ssh

ssh-keygen -t rsa -C ""
cat ~/.ssh/

Copy the content in the SSH keys of your Github profile

 ssh -T

push changes

in your local copy of the repository:

git remote set-url origin

Then once you changed something

git commit -am "your comment"
git push

GIT Merge conflict

git config merge.tool vimdiff
git config merge.conflictstyle diff3
git config mergetool.prompt false

Navigate using Ctl+W between LOcal BAse REmote
or MErge windows displayed like so:

║       ║      ║        ║
║       ║      ║        ║
║                       ║
║        MERGED         ║
║                       ║

If you want to get changes from REMOTE

:diffg RE  

If you want to get changes from BASE

:diffg BA  

If you want to get changes from LOCAL

:diffg LO 

Once the MErged windows looks like what you want
Step 5. Save, Exit, Commit and Clean up


save and exit from vi

git commit -m "message"
git clean

Remove extra files (e.g. *.orig) created by diff tool.


software/cli/git.txt · Last modified: 2021/12/29 21:09 by warnaud