Githuh: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
git config --global user.name "John Doe" | git config --global user.name "John Doe" | ||
git config --global user.email johndoe@example.com | git config --global user.email johndoe@example.com | ||
git config --global init.defaultBranch main | |||
git config --global credential.helper store | |||
</pre> | </pre> | ||
=== Create Repository === | === Create Repository === | ||
<pre>git init</pre> | <pre>git init</pre> | ||
Line 25: | Line 24: | ||
=== Pull === | === Pull === | ||
<pre>git pull</pre> | <pre>git pull</pre> | ||
=== Difference / Comparaison === | === Difference / Comparaison === | ||
<pre>git diff</pre> | <pre>git diff</pre> |
Revision as of 01:37, 25 July 2022
Usefull Git command
Configuration
- User config file
~/.gitconfig
- Show setting
git config --list --show-origin
Basic Setup
- Setup user and email
git config --global user.name "John Doe" git config --global user.email johndoe@example.com git config --global init.defaultBranch main git config --global credential.helper store
Create Repository
git init
Set Remote
git remote set-url origin git@gitlab.com/group/report.git
or
git remote set-url origin https://username:password@gitlab.com/group/repot.git
Pull
git pull
Difference / Comparaison
git diff