Ukesh’s Weblog

Basic git commands

Posted in git by ukesh on November 26, 2010

Need to do an initial commit:
mkdir dir_name
cd dir_name
git init
git add .
git commit

Repository cloning:
git clone repository_url

Add a file:
git add file_path

What are the things you modified and added locally
git status

Commit the files:
git commit

git pull
git push origin master(after commit need to push the files)

Need to see the commits
git log

Delete a Remote Branch from GitHub
git push origin :branch_name

Advertisement

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 )

Connecting to %s

Follow

Get every new post delivered to your Inbox.