1) create repository
2) copy HTTPS
3)go to project directory and open git bash
4) ls
5) git init
6) git remote add origin (paste the link of number 2, don't give any bracket)
7) git remote -v
8) git add .
9) git commit -m "First Commit"
10) if the above line of code ask the question like who you are?
than use the following code:
git config --global user.email "some@email.com"
git config --global user.name "ha"
than use the following code:
git commit -m "First Commit"
11) git push origin master
12) if number 11 says rejected! than use the following command:
git push -u -f origin master
for any help use the following command:
git help
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
To update any changes to github:
_____________________________
1) git status
2) git add .
3) git status
4) git commit -m "any message regarding commit"
5) git status
6) git log ------------------------not necessary
7) git push origin master
TO UPLOAD IN A NEW GITHUB ACCOUNT: USE THE FOLLOWING CODE TO GET ACCESS TO
ANOTHER GITHUB ACCOUT:
git config --local credential.helper ""
the above code will ask for username and password then you can push your project
git push origin master
Thanks for reading. You can bookmark this web-page for regular use purpose.

Comments
Post a Comment