1. Install git on local machine
git --version
sudo apt update
sudo apt install git
2. Push code in github
touch .gitignore <-- (add gitignore)
<Set on Local Machine>
git config --global user.name "Sk Zaffar Ekbal"
git config --global user.email "[email protected]"
git config --list
git init
git add .
git commit -m "first commit"
git status <-- To check git status
git remote add origin <[email protected]:skzaffarekbal/covid19.git> <-- add from github site repo
git push -u origin master
<Generate SSH Key>
ssh-keygen -t rsa -b 4096 -C <"[email protected]"> <-- add your email id
cat <--/home/skzaffarekbal/.ssh/id_rsa.pub--> <-- add link for ssh key
3. Open Online VS Code in GitHub
https://github1s.com/skzaffarekbal/json-user-album
(After github write 1s)
4. To Clone a project from git
git clone <[email protected]:zipdj/zipdj-react-front-end.git>
git branch <-- To check branch.
git remote update <-- To updates the branch.
git checkout zaffar-dev <-- to check out the branch.
git pull origin development <-- to pull from the development.
<Before Push in your branch>
git add .
git commit -m "Responsive"
git commit --amend -m "rename the commit message."
git pull origin zaffar-dev
git push origin zaffar-dev <-- To push on my branch
git reset --hard <-- To reset all modified changes.
Related