How to use git.
Use git .
Make account on github. after click on + for create repository and name .
It' s only first time follow steps.
git config --global user.name "Type Your name"
git config --global user.email "Type Your email"
git touch .gitignore //touch for make file and if folder than use slash /
git init
git add . // after add use (dot)
git commit -m "Initial Commit "
git status
git remote add origin --Paste your ssh key or https key --
git push origin master
**Code after changes in file ***
**
git status
git add .
git commit -m "add files"
git push origin master
// Make branches ..
git branch //show branches
git branch login-system //for create branches
git checkout login-system // insert in branches.
//after make login-branch.
git status
git add .
git commit -m "code paste in login-branch"
git push origin login-system
//for merge with master branch.
git checkout master // insert in master branches
git merge login-system
git push origin master
git push -u origin master //after -u not require of write origin master only write git push.
//for delete branch
git push origin --delete login-system //from git hub
git branch -d login-system //from local pc.
***for genetate ssh key
https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
Comments
Post a Comment