Git clone new repository on Stash

Posted: June 12, 2013 in web

Configure Git for the first time

git config –global user.name “Pedro Pendico”
git config –global user.email “pedro@dot.com”

If you want to simply clone this empty repository then run this command in your terminal.

git clone http://pedro@web/stash/scm/VET/wordpress.git

If you already have code ready to be pushed to this repository then run this in your terminal.

cd existing-project
git init
git add –all
git commit -m “Initial Commit”
git remote add origin http://pedro@web/stash/scm/VET/wordpress.git
git push origin master

If your code is already tracked by Git then add this repository as a new repository that you can push to.

cd existing-project
git remote set-url origin http://pedro@web/stash/scm/VET/wordpress.git
git push origin master

Advertisements

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