Go to the download link and click on the version as per your system. Let it download and then install it.
This will install git in your system, along with command prompt for it called git bash. The next step is to configure the system with your git account. Once you have signed up for GitHub, you can use this to setup your system. Open up you git bash and type the following commands.
git config --global user.name "jalFaizy"
git config --global user.email ff@ff.com
Now there’s two tasks you have to do.
- Create a repository on GitHub
- Connect it with your code directory.
To accomplish the tasks, follow on to the steps mentioned below
Step 1: Add a new repository on GitHub
Step 2: Give proper descriptions to setup the repository.
Step 3: Get link to the repository
Step 4: Connect you local repository with the repository on GitHub with the commands below.
git init git remote add origin <add link here> git pull origin master
Now if you want GitHub to ignore the changes in the files you can mention them in .gitignore file. Open it and add the file or folder you want to ignore.
git add -A . git commit -m "add first commit" git push -u origin master
Now each time you want to save your progress, run these commands again
git add -A . git commit -m "<add your message>" git push -u origin master
This will ensure that you can go back to where you left off!
No comments:
Post a Comment