undefined undefined undefined

GIT.

Open in new window

GIT

mkdir /path/to/your/project
cd /path/to/your/project
git init
git remote add origin git@bitbucket.org:zdimon/prj.git


echo "HELLO" >> readme.txt
git add contributors.txt
git commit -m 'Initial commit with contributors'
git push -u origin master

Create new branch

$ git branch  <name_of_your_new_branch>

$ git checkout  <name_of_your_new_branch>

$ git push origin <name_of_your_new_branch>

Delete commit

git reset --hard HEAD~1
git reset --hard <sha1-commit-id>
git push origin HEAD --force

Edit commit

git commit --amend -m "Add an author/email comment"

Deploy

Creating Our Repository

Login to your VPS from command line and type the following:

cd /var mkdir repo && cd repo mkdir site.git && cd site.git git init –bare

–bare means that our folder will have no source files, just the version control.

git remote add live ssh://user@mydomain.com/var/repo/site.git

git remote add origin ssh://zdimon@178.136.229.252/home/zdimon/storage1/pip

git clone ssh://zdimon@178.136.229.252/home/zdimon/storage1/pip

Other topics