Git Hub Commands
Configure the author name and email address to be used with zour commits.
- git config - - global user.name "your user name"
- git config - -global user.email "your email address"
create a new local repository
checkout a repository
Add files
- git add .
- git add "file name"
commit changes to head (not to remote repo)
- git commit -m "file has changed"
commit any file that you have added with git add
send changes to the master branch of your remote repository
if you have not connected your local repo to a remote server
- git remote add origin "url"
list all the remote repo
create a new branch
- git checkout -b branch name
switch from one branch to another
list all the branches in your repo also tell your current branch
delete the branch
- git branch -d branch name
push the branch to your remote repository
- git push origin branch name
push all the branches to remote repositorz
fetch and merge changes on the remote server
to merge a branch
analysis the changes
history
SSh key setup
- ssh-keygen -t ed25519 -C "your email address"
- ls -al ~/.ssh
- cd .ssh
- cat ~/.ssh/id_ed25519.pub