How to do Git Commit from Terminal in Mac?


1 : initial setup of git repository

 

 rm -rf .git      —> remove all existing .git files

 

 git init          —-> initializing git repository

 git add ./     ——> add all files to git

 git commit ./ -m”final update ater project completion”       —-> commit file to git 

 git remote add origin yourRemoteUrl/other git url   —> ading url to post

 git push -u origin master       —> pushing first time file to master   

2 : after modifications in file 

 git commit ./ -m”test update”

 git push

Advertisements

One thought on “How to do Git Commit from Terminal in Mac?

  1. Reblogged this on MobileDesk and commented:
    How to do Git Commit from Terminal in Mac?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s