##################################
Server Part :
mkdir <Project Name>
cd <Project Name>
sudo git --bare init
chmod 777 ../<Project Name> -R
##################################
Client Part (First time):
cd /path/to/your/projects/new_project
git init
##### Add repository into git remote #####
git remote add origin ssh://Remote_login_account@Remote_login_host/var/git/new_project.git/
If want change ssh, Please type
git remote set-url origin ssh://root@111.2.1.103/home/freeman/CVS/UBEE_D3_CableRG.git
##################################
git add .
git commit -m '註解'
git config pack.threads 1
git tag -a <tag name> -m <description> (-a <tag name> -m <description about the tag>)
git push origin master --tags
##### cvs checkout #####
git clone ssh://Remote_login_account@Remote_login_host/var/git/new_project.git/
##### cvs add file && cvs commit #####
cd directory
git add *
git commit -m "Adding new files"
git push ssh://Remote_login_account@Remote_login_host/var/git/new_project.git/
##### cvs checkout by using tag #####
git clone -b "tag name" ssh://root@111.10.10.10/home/happy/git
##### Update Tag to remote repository #####
git tag -a <tag name> -m <description>
git push origin --tags
Reference:
- Git push - suboptimal pack - out of memory
- [git server][ubuntu] Build up git server (using Ubuntu linux)
- [Git] How to tag by using git
- Git: How to recursively add the files in a directory
- 寫給大家的 Git 教學
0 意見:
張貼留言