Version Control

Version Control in Salesforce Using BitBucket 2/3

Version Control Using BitBucket 2/3

This is a continuation of my previous post where I explained signing up bitbucket user account and creating teams, project, repository and branches on the cloud. 

In this post, We will be committing our local files on to the bitbucket cloud.
We can do this by using command line but source tree is a very user friendly tool by which we can deploy our files using just point and click to the remote server.
Please follow the below steps to download and install source tree:
Note : If you face any difficulties following these steps, you can refer detailed video provided at the bottom of this post.

Installing SourceTree :
1. Go to https://www.sourcetreeapp.com/
2. Click on Download for windows button if you are working on windows OS.
    It will download .exe file for you.
3. Once download is complete, execute the .exe file to install sourceTree.
4. While installing accept the default.

Cloning the first remote repository :
1. Open sourceTree.
2. Click on file and then clone/new
3. Click on remote account
4. Click on Add an Account
5. In the new window, select basic for authentication.
6. Enter your bitbucket account username created in this post 
7. Click on refresh password.
8. If new window opens up, provide your password and click on ok.
9. Once account is added, in the same window search for the repository you           created in the last post and click on clone.
10. It will clone remote repository into local directory.

Committing your first Change :
1. In the cloned git directory you would find one readme.txt file.
2. You can create a simple test.txt file with some line of text.
2. When you go back to sourceTree, it will show you test.txt file in staging area.
3. Stage that file and provide some description in commit message.
4. Click on commit. Yet file is locally saved.
5. As soon as you click on commit, you will see one notification on push button. 
6. Click on push button to move changes to the remote
7. Go back to your bitbucket and account and you would notice the new commit.

For detailed steps, please watch below video.



About Jetha Choudhary

1 comments:

Powered by Blogger.