- Understand the basics of git
- Create a local git repository using the command line
- Push local git repository to github
git init
git status
git add <file name>
git commit -m "your message"
git push -u <remote name> <branch name>
here is some helpfull commands in this tutorial
pwd : to show the current path
mkdir < chooseAnyName > : to creat a new directory in current path
cd < dirName > : to change path to the chosen directory
rm -rf < dirOrFileName > : to delete file or directory in the current path
touch < chosseAnyName > : to create a new file tn current path
Download git from the official website Git.
Make sure to have this option, but other than that everything is default.
mkdir git-tutorial
cd git-tutorial
git init
git status
touch file.txt
ls
git status
git add file.txt
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git commit -m "my first commit!"
git log
Then create a repository by clicking on the top right "+" then "new repository".
After that give it a name
git remote add origin <link to repo>
first we have to copy the url of the repository we just made on github
then we do the above command
git push -u <remote repo> <branch name>
Here it will ask you for your github username and password
this is everyting for this totorial follow us in : Facebook Group and github osc