How to git configure?
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
- git init to initiate the git repository on your local folder i.e /var/www/html/demo
- git remote to add the origin with branch url.
- 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.
- git add is used to add the mention file.
- git commit is used to commit the file. “first commit” will be show in the column of git hub file listing.
- 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.