Git Repositories (unlike subversion and TFS) actually live in the directory with your files.
Table of Contents
- 1 Adding a Remote Repository on BitBucket (After you created a local Git repository)
- 2 Create a Upstream Branch
- 3 Creating a Repository
- 4 Set name and email to mark all changes with it
- 5 Say to Git to start tracking a file
- 6 Add files to the repository (check in)
- 7 Create a Branch
- 8 Change to the master branch
- 9 Delete a Branch
- 10 Change to another branch
- 11 Create a tag on Git
- 12 Merge two branches
- 13 Enable sintax highlighting on MAC
- 14 Stop tracking a file
- 15 Shows commit logs
Adding a Remote Repository on BitBucket (After you created a local Git repository)
git remote add SomeName https://bitbucket.org/FernandoRodriguesBitBucket/SomeName
Create a Upstream Branch
git push --set-upstream somename master
Creating a Repository
mkdir /repofolder git init /* Tell Git to track everything is this directory */
Set name and email to mark all changes with it
git config user.name "Fernando Rodrigues" git config user.email "mail@mail.com"
Say to Git to start tracking a file
git add filename
Add files to the repository (check in)
git commit -a -m "Message about the files"
Create a Branch
git branch branchname
Change to the master branch
git branch master
Delete a Branch
git branch -D branchname
Change to another branch
git checkout nameofbranch
Create a tag on Git
git tag -a tagname -m "descriptionofthetag"
Merge two branches
//Move to the main branch and git merge nameofthebranchwithsomethingnew /* or not */
Enable sintax highlighting on MAC
git config --global color.ui auto
Stop tracking a file
git rm --cached filename
Shows commit logs
git log
What do you think?