Archive for June 2015

git copy from one remote to another remote

1. git branch -a 2. git checkout -b v2-markup origin/v2-markup 3. git push kleidooprivate v2-markup

git clone with a private key over ssh

1. ~/.ssh/config Host privgit User git Hostname 127.0.0.1 Port 2233 IdentityFile ~/Projects/my-self-generated-keys/git/privgit 2. git clone privgit:phprivit.git Cloning into ‘phprivit’… Enter passphrase for key ‘/home/imran/Projects/my-self-generated-keys/git/privgit’:

git replace master on remote repo

login to remote server, go to git repository and type git config receive.denyDeleteCurrent ignore git push origin :master git branch -m master-new master git push origin master git push origin :master-new login to remote server, go to git repository and type git config receive.denyDeleteCurrent true

git add new remote server

imran@imran-Dell-System-Inspiron-N7110:~/Projects/dev$ git remote add kleidooprivate kleidooprivgit:phpkleidoo.git bash: git remote -v imran@imran-Dell-System-Inspiron-N7110:~/Projects/dev$ git remote -v kleidooprivate ssh://kleidooprivgit/phpkleidoo.git (fetch) kleidooprivate ssh://kleidooprivgit/phpkleidoo.git (push) origin https://aghayevi@bitbucket.org/htmlexperts/kleidoo.git (fetch) origin https://aghayevi@bitbucket.org/htmlexperts/kleidoo.git (push)

git remove remote server

imran@imran-Dell-System-Inspiron-N7110:~/Projects/dev$ git remote remove kleidooprivate

cloning magento module

git clone kleidooprivgit:magentomodule.git

push to remote custom branch from local master (magento case)

git push origin master:magento

git delete local branch

imran@imran-Dell-System-Inspiron-N7110:~/Projects/dev$ git branch -d r error: The branch ‘r’ is not fully merged. If you are sure you want to delete it, run ‘git branch -D r’. imran@imran-Dell-System-Inspiron-N7110:~/Projects/dev$ git branch -D r Deleted branch r (was 25491ec).

git remove local untracked files

git clean -f -d

git search by author

git log –author=’laszlo’ git log –author=’botond’