Home » Server » How to git configure?

How to git configure?

github

There is no any big deal to configure GIT online. First of all you have to create a online account on https://github.com. Run the below command on the ubuntu terminal.

1. git init
2. git remote add origin https://github.com/branch-name.git
3. git status
4. git add demo.txt
5. git commit -m "first commit"
6. git push -u origin master
  1. git init to initiate the git repository on your local folder i.e /var/www/html/demo
  2. git remote to add the origin with branch url.
  3. git status will show all your modified file to push on the server. Also if you want newly created file to server than there is no any issue.
  4. git add is used to add the mention file.
  5. git commit is used to commit the file. “first commit” will be show in the column of git hub file listing.
  6. git push is used to push the file on the server. it will ask for username and password. you can use the login details which you created for account.

Leave a Reply

Your email address will not be published. Required fields are marked *