Source Tree 2.1 Mac Download Updated

Source Tree 2.1 Mac Download

Next upwardly: Acquire Sourcetree with Bitbucket

Stride i: Create a Git repository

Equally our new Bitbucket space station ambassador, you need to be organized. When you brand files for your space station, y'all'll desire to go along them in one identify and shareable with teammates, no matter where they are in the universe. With Bitbucket, that means calculation everything to a repository. Let's create ane!

Step 1: Create the repository

Initially, the repository you create in Bitbucket is going to exist empty without any code in it. That's okay considering yous will offset adding some files to information technology soon. This Bitbucket repository volition be the central repository for your files, which means that others can access that repository if you lot give them permission. You volition also copy a version of that repository to your local system—that way you lot tin can update it from 1 repo, then transfer those changes to the other.

Central repo to local repo

Do the post-obit to create your repository:

  1. FromBitbucket, click  the  +  icon in the global sidebar and selectRepository. Bitbucket displays theCreate a new repository page. Take some time to review the dialog's contents. With the exception of theRepository type, everything y'all enter on this page you can later change.
  2. Enter BitbucketStationSupplies for theProper noun field. Bitbucket uses thisName in the URL of the repository. For example, if the user the_best has a repository called awesome_repo, the URL for that repository would be https://bitbucket.org/the_best/awesome_repo.

  3. Go along the remainder of the options as is unless yous want to alter them:

    • Admission level —Leave theThis is a private repository box checked. A individual repository is only visible to yous and those with access. If this box is unchecked, anyone can see your repository.

    • Include a README? —If you lot recently created your account, this defaults to a tutorial README. For the purposes of this tutorial, pick either of theYep options, that style you'll start out with a file.

  4. FromVersion control arrangement, you can choose eitherGit orMercurial. If you aren't sure which one to go with, proceedGit as your option.

  5. ClickCreate repository. Bitbucket creates your repository and displays itsSource folio.

Pace 2: Explore your new repository

Take some fourth dimension to explore the repository you take just created. To view the shortcuts available, press the? key on your keyboard.

Click+ from the global sidebar for common actions for a repository. Scan through the links in the navigation sidebar to see what's behind each one, including the repositorySettings where yous'll update repository details and other settings. Click theCommits in the sidebar. If you included a README, you lot'll come across one commit on that page.

Your repository is private and yous have not invited anyone to the repository, so the only person who tin create or edit the repository'south content correct now is you, the repository owner.

Explore repository gif

Step 2: Copy your repository and add files

Now that you take a place to add together and share your space station files, you demand a way to get to it from your local system. To set that up, you desire to copy the Bitbucket repository to your system. Sourcetree refers to copying a repository as "cloning" it. When you clone a repository, you create a connection between the Bitbucket server and your local system.

Origin to local

Step 1: Clone your repository to your local system

Utilise Sourcetree to clone your repository to your local system without using the command line.

  1. Equally y'all employ Bitbucket more than, you will probably piece of work in multiple repositories. For that reason, it's a good idea to create a directory to contain all those repositories. So kickoff by creating a directory on your local organization and call it repos.
  2. From Bitbucket, go to yourBitbucketStationSupplies repository.

  3. Click the Clone push button in the elevation correct corner. Bitbucket displays the Clone this repository dialog.

  4. From theClone this repository dialog, clickClone in Sourcetree.

  5. From theClone New dialog box, update theDestination Path to /repos/bitbucketstationsupplies . This destination path refers to the directory yous just created with the binder for the repository. TheProper noun field remains the aforementioned with the folder proper noun of the repository.

  6. Click theClone push.

Congratulations! Y'all've cloned your repository to your local system.

Step two: Create a file, add it locally, and push it to Bitbucket

With the repository on your local system, yous can kickoff making a list of all the supplies yous need for your space station. To practise so, let's create a file for your supplies.

As you work on this department, the images may look slightly different, depending on whether you are working with a Git or Mercurial repository.

  1. Double-click the bitbucketstationsupplies repository in Sourcetree and discover that there is nothing to commit from your local repository to the remote repository.

  2. Apply a text editor to add the following three lines:
    infinite ice
    cream nerf
    darts telescope calorie-free shield

  3. Save the file as supplies.txt to the bitbucketstationsupplies directory on your local system. The supplies.txt file now appears in Sourcetree since you created it in your local repository.

  4. At present is the point where you set up a snapshot of the changes before committing them to the official history. From the options carte of the supplies.txt file, selectStage file (for a Git repository) orAdd file (for a Mercurial repository).

  5. Click theCommit button at the top to commit the file.

  6. In the message box, enter "Initial commit."

  7. Click theCommit button under the box. Your new file is now committed to the project history.

    Up until this signal, everything yous take washed is on your local system and is invisible to your Bitbucket repository until you push those changes to your remote Bitbucket repository.

  8. From Sourcetree, click thePush button button to button your committed changes. Pushing lets y'all movement ane or more than commits to another repository, which serves as a convenient way to publish contributions.

  9. From the dialog box that appears, your next step depends on whether y'all are using Git or Mercurial:

    • Git–Under thePush button? cavalcade, select the primary co-operative to bespeak that you are pushing that branch to origin and clickOK.

    • Mercurial–Everything is automatic, so all you have to practice is clickOK.

  10. Become to yourBitbucketStationSupplies repository in Bitbucket.

    • If you lot clickCommits in the sidebar, you'll see your commit in the repository. Bitbucket combines all the things yous just did into that commit and shows information technology to you.

    • If you clickSource in the sidebar, yous'll see your file in the repository, the supplies.txt file you lot simply added.

Pace 3: Pull changes from your repository

Next on your list of space station administrator activities, y'all need to file out a request for new supplies. Let'due south set up a system for getting supplies to our Bitbucket space station. With just a fleck more knowledge of Bitbucket and Sourcetree, we'll exist supporting our infinite exploration for years to come!

Stride 1: Create a file in Bitbucket

To add your supply request file, practise the post-obit:

  1. From yourBitbucketStationSupplies in Bitbucket, clickSource to open the source directory. Notice yous only have one file,supplies.txt, in your directory.

    • A. Source page: Click the link to open this page.

    • B. Branch selection: Pick the branch you want to view.

    • C. More options push: Click to open a carte with more than options, such as 'Add together file'.

    • D. Source file area: View the directory of files in Bitbucket.

  2. From theSource page, click theMore than options button in the acme right corner and selectAdd file from the menu. TheMore than options push button simply appears after you take added at to the lowest degree one file to the repository. A folio for creating the new file opens, as shown in the following image.

    • A. Branch with new file:Alter if you desire to add together file to a different branch.

    • B. New file area:Add content for your new file here.

  3. Enter supplyrequest in thefilename field.

  4. SelectHTML from theSyntax manner list.

  5. Add together the following HTML code to the text expanse:

    We are requesting additional supplies. Delight send united states the post-obit:



    • space ice cream

    • nerf darts

    • telescope calorie-free shield

  6. ClickCommit. TheCommit message field appears with the message:supplyrequest created online with Bitbucket.

  7. ClickCommit under the bulletin field.

You lot now have a new file in Bitbucket!  You are taken to a folio with details of the commit,  where you can encounter the change you just made:

If you want to meet a list of the commits you've made so far, clickCommits in the sidebar.

Step 2: Pull changes from a remote repository

At present nosotros demand to get that supply request course onto your local organization. The process is pretty directly forward, basically only the reverse of the button you used to go the supplies.txt file into Bitbucket.

To pull the file into your local repository, do the following:

  1. Open your repository in Sourcetree, and click the Pull push button.

    A popup appears to point that you are merging the file from Bitbucket to your local repository.

  2. ClickOK from this box. Sourcetree updates with a clarification of the merged file.

  3. Navigate to your repository folder on your local system and you lot'll see the file you only added.

Fantastic! Now, you take finished the basic DVCS workflow (clone, add together, commit, button, and pull) between Bitbucket and your local organization.

Step 4: Use Sourcetree branches to merge an update

After looking through the Intergalactic Mall Magazine, you see a pair of speakers that you actually want for the space station. They are big plenty to produce a good amount of sound and soft plenty that the lack of gravity won't cause them to crash. The only trouble is that they pretty pricey, and you need approval earlier you can officially add them to your list of supplies.

In the meantime, create a feature branch so that you lot can update the supply to your request listing while you wait. And so when you take approval, y'all just merge the requests file from the characteristic branch into the main branch.

Branches are most powerful when y'all're working on a squad. Yous can work on your own function of a projection from your own branch, pull updates from Bitbucket, and then merge all your work into the primary branch when it's ready.Our documentation includes more explanation of why you would want to employ branches.

Pace 1: Create a branch and make a change

Allow's create a branch so that you can list the speakers in your supply requests file. Fifty-fifty though branches piece of work differently between Git and Mercurial, you create them in a similar way from Sourcetree.

  1. From Sourcetree, click theCo-operative push.
  2. Depending on whether you have a Git or Mercurial repository, you see a dissimilar popup for creating a new branch. From theNew Branch orCreate a new co-operative field, enter wish-list for the name of your branch.

  3. ClickCreate Branch orOK.

  4.  From Sourcetree, click theProve in Finder button. The directory on your organisation opens.

  5. From the directory binder, open the supplyrequest file with a text editor.

  6. Making a modify to the file by adding the following detail to the list of supplies:

  7. anti-gravity speakers
  8. Save the file.

  9. Open up the view in Sourcetree and discover that your repository now has uncommitted changes.

    From hither, everything you lot do is the same as you did when you added the supplyrequest file and initially committed information technology.

  10. If you accept a Git repository, brand supplyrequest.txt ready to commit by selectingPhase file from the options carte du jour.

  11. Click theCommit push button at the acme to commit the file.

  12. In the message box, enter "Adding an item for my wish list."

  13. Click theCommit button under the box. From Sourcetree, you run into that the file has been updated on the wish-list co-operative.

Step ii: Merge file changes from a co-operative

Your speakers were approved! At present it's time to update the master supply list with your wish-list detail.

  1. First, you desire to switch back to the principal branch. From the left-side card items in Sourcetree, hover your mouse over the correct side of theBranches label so that the wordShow appears.
  2. WhenBear witness appears, click it. Under the Branches heading, you will see the 2 branches for this repository, the main co-operative, and the wish-listing branch. The chief branch for a Git repository is chosen primary. The main branch for a Mercurial repository is chosen default.
    Branches list
  3. Double-click the feature co-operative (in this case wish-listing) to switch to that branch.

  4. Click theMerge button.

  5. From the popup that appears, make certain the commit on your wish-list branch is highlighted. You are indicating that y'all want to add together the commit from this branch to the main branch.

  6. If you accept a Git repository, check this selection at the lesser:Create a commit fifty-fifty if merge resolved via fast-forward.

  7. ClickOK. You have updated the supplyrequest file in your main branch with your wish-list item. Sourcetree volition await slightly different based on whether you have a Git or Mercurial repository.

  8. If yous have a Git repository, yous are washed. If you have a Mercurial repository, you volition notice that you need to commit your changes. Click theCommit button at the top. The commit message defaults to a description with "Merge." Keep this bulletin and go ahead and clickCommit.

Step iii: Push button your modify to Bitbucket

  1. From Sourcetree, click theButton button to button your committed changes.

  2. From the dialog box that appears, click theOK push button to push changes to your local repository.

  3. Click theOverview page of your Bitbucket repository, and notice you tin can run across your push in theRecent Activity stream.

  4. ClickCommits and y'all can come across the commit yous made on your local system. Discover that the change keeps the same commit lawmaking that information technology had on your local system.

  5. ClickSource, then click the supplyrequest file. You tin can run across the last alter to the file has the commit lawmaking you just pushed.

  6. Click the file history list to encounter the committed changes for this file, every bit shown in the following image.

You are done!

That was intense! Perchance. Depends on how it compares to launching into space. Now that y'all know a lot more than about Bitbucket, you lot are at present prepared to run your space station's activities a lot better. Now, take a break and go do some star gazing.

Want to learn more almost Bitbucket and Sourcetree? You tin can have onthe claiming of updating a teammate's repository.

Source Tree 2.1 Mac Download

Posted by: boonefultakfard.blogspot.com

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel