Git is a distributed revision control system designed and developed by Linus Torvalds.
Every Git clone is a full fledged repository with a complete history and full revision tracking capabilities, not dependant on
network access or a central repository server.
More information can be found at:
http://git-scm.com
Create a git repository in Bitbucket
Information
Bitbucket
is a web based hosting service that is owned by Atlassian, used for source code and development
projects that use either Mercurial or Git revision control systems.
Bitbucket offers both commercial plans and free accounts. It offers free accounts with an unlimited
number of private repositories which can have up to five users in the case of free accounts.
The total repository size has a soft limit of 1 GB.
Operating system used
none
Software prerequisites
none
Procedure
- Lets assume you created a project called: ~robertlie/mobilefish_web_files
It it recommended to use a single word projectname.
This project contains multiple subdirectories with one or more files in each subdirectory.
You now want to version control your project by creating a git repository in Bitbucket.
- Create a Bitbucket account and login.
- In the Bitbucket environment create a repository with the same name as your project: mobilefish_web_files
This repository can be accessed with URL:
https://[email protected]/your_bitbucket_username/
mobilefish_web_files.git
- Enter the following commands:
- Type: cd mobilefish_web_files
- Create a mobilefish_web_files/.gitignore file.
Add the following line in the .gitignorefile file.
In this example .DS_Store will not be version controlled:
.DS_Store
- Type: git init
- Type: git add .
- Type: git commit -m "Initial version"
- Type: git remote add origin https://[email protected]/your_bitbucket_username/
mobilefish_web_files.git
- Type: git push -u origin master
- Your local mobilefish_web_files project is now uploaded to the remote repository and git version controlled.
|
|