Note for me, how to tag with git. Because I always forget it! git tag -a v1.4 -m ‘version 1.4’ git tag The first line creates a tag with the annotation (-a) v1.4 and the message (-m) “version 1.4”. And this line pushes the tag to origin master. git push –tags
Tag Archives: GIT
Mountain Lion + Git
I just installed Mac OS X Mountain Lion, as an update via the app store. Worked pretty good. After less than 30 min it was installed. Everything worked. I just missed the command line tool git. To fix that issue I had to install the newest XCode version and XCode command line tools. The XCodeContinue reading “Mountain Lion + Git”
Git add, commit, push, pull
If you make changes on your local repository you can add all your changes to your local history with git add . With the . you add all new files to the local history. With this command you commit everything to your local git repository. git commit -m “new changes” You can do multiple commit.Continue reading “Git add, commit, push, pull”
Add a project to github
github.com is a pretty good git repository server for open source projects. If you have an account you can add easily a project to your github repo. At first generate the git project by executing this line in your project root: git init than add all files from your project to your local git repo:Continue reading “Add a project to github”
.gitignore
If you want that git is ignoring some files for you you just have to create the “.gitignore” file in your project root. Here you can add all the files you don’t want have in your git repository. For example some meta files from IntelliJ IDEA. *.iml *.ipr *.iws .idea/
Create a GIT Repository
Just go into the directory you want to have version control for and type in: git init This will create an empty git repository on your hard disk. With this command git add . you can add all files in the directory to the git repository. And with git commit -a -m “init” you canContinue reading “Create a GIT Repository”
Creating a branch with git
Just go into the root directory of your project and type in: git checkout -b branch1 That’s all. Now your created a new branch with the name “branch1”. Your working directory is now the branch. You can commit your changes like this: git add . git -a -m “my changes” After the commit you canContinue reading “Creating a branch with git”