Here are the STEP BY STEP instructions to use git to save your project into the local repository
To start with you should configure your git by command:
$git config --global user.name "your name"
Then you should configure your email address by which you have made GitHub account
$git config --global user.email "your_email@email.com"
Initialize your git repository by using command:
$git initthese commands has to be entered by parsing on to your directory where your project is residing.
Next you have to add your file using:
$git add filenameNow your status is staged, your file not yet committed. You can add more file by using same command recursively.
Now you can commit by:
$git commit -m 'revision version'you can change your previous commit by using:(optional)
$git commit --amendThis command takes your staging area and uses it for the commit.
After commit you should add your remote repository for which you have made an account by using:
$ git add repositoryname [url]
you can copy/paste url from your Github.com repository.
Finally to push your commited files type:
$git push reponame urlYour account will be updated.
..........................................Thank you....................................................
No comments:
Post a Comment