Quick Git Startup Guide | |
apt-get install git |
|
git config --global user.name "Bernard Parent" git config --global user.email bernparent@gmail.com |
|
#!/bin/sh filecheck="gitpull.sh" if [ -f "$filecheck" ]; then if [ $# -eq 1 ]; then if git show-ref --tags $1 ; then echo Version $1 already committed exit fi if git ls-remote --exit-code --tags origin $1 ; then echo Version $1 already committed on server exit fi echo 'cleaning latex directory..' make cleanall echo 'copy to origin using git..' git add -A . git commit -a -m "$1" git tag -d $1 > /dev/null 2>&1 git tag -a $1 -m "$1" git push --tags origin master echo '[done]' else echo "gitnewversion.sh needs one argument: the new version string" fi else echo "gitnewversion.sh must be run from the project main directory." fi chmod u+x gitnewversion.sh ./gitnewversion.sh 19feb18a |
|
git clone ssh://myusername@myserver.com/home/myusername/projectname git clone https://bernardparent@github.com/bernardparent/CFDWARP |
|
#!/bin/sh filecheck="gitpull.sh" if [ -f "$filecheck" ]; then git pull --tags origin master else echo "gitpull must be run from the project main directory." fi chmod u+x gitpull.sh ./gitpull.sh |
|
git checkout 16may05 git checkout master git reset --hard |
|
git status git fsck git tag |
|
||||||
$\pi$ |