- A GitHub Acoount . If you don't have one make it here
- Git . Install Git here
- Run the setup file,click next
- Check 2nd checkbox as shown and click next
- Check with use the native window secure channel library and click next
- Check with use MinTTY and click next
- Check first two checkbox and click next
- Installation process start
- Open your Github account . You will see a page somewhat like this .
- Click on Start Project Button to create a new project repository.
- Alternatively you can also click on the new repository as shown in the bottom corner of the image .
- Once you have clicked you'll be directed to this page.
- Enter the repository name you want . Remembere there are some conventions to naming the repositories . When you enter the name wait for a while until the green tick comes as shown in the image .
- Then you can Click on the green create Repository button .
- Then you will be redirected to the next page.
- You have succesfully created a new repository on github .
- Now we will see how we can push our data in the repository
- Once you have installed Git on your system we can push our projects through it.
- Open Git Bash and you will something like this.
- The First two commands you need to run are just to get youself registered on Git.
git config --global.user "santk97"
git config --global user.email "****@gmail.com"
- Make sure the username and email you enter are github registered(not necessary but makes work easy)
- Now you need to direct your git to the destined folder .For that we use the
cd "path"
command . In the double quotes you need to enter the full path of your project .
5 Now that we have reached ou project folder the first thing we need to do is initialise out git in the project .
git init
Use this command. It will make a .git folder in your project .
6 . Now that we have created the git folder . We will now add the files to be pushed , It can be done in two ways:
- Selectively
git add filename
- All Files
git add .
7 . We will use the git add . command 8 . Once we have added , the next thing we need to do is commit these changes .
git commit -m "your commit message"
Remember:The commit message should be a meaningful one .
- Next we will connect our GitHub repo with this project using the link given to us on the github page . Copy the blue highlighted part
10 . Next we will use the URI Link to connect our project to github .
- For that we will use
git remote add origin ** paste here**
12 . The last step is to to push the changes to the repository.
git push origin master
13 . If everything you have done is correct and followed the guide correctly your github repository should have been updated. something like this
-
In some cases when you push you might have to sign up . Remember : when pushing your network should be working
-
For the next times you just need to remember these commands in this order
git add .
git commit -m "your message"
git push origin master
- Some other useful commands are :
git log #tells the log of your commits
git status # used to know the status of the files being tracked or not
17 . Thank you .