How to download a bitbucket project by git

Asked

Viewed 7,197 times

1

Good morning!

I had never used git or bitbucket, I wanted to know how to check out a project that is in bitbucket.

Thank you in advance.

  • normally, git clone remote-url-do-repo and then git checkout master; But this information usually comes from the repository that you’re trying to clone..

  • @Moshmage, I’ve already done git clone, how do I check out? Return the following to me fatal: Not a git repository (or any of the parent directories): .git

  • ago cd nome-da-pasta and then yes, git checkout master

  • @Moshmage, I’m sorry. I’m new in this area and I couldn’t understand, do you have an answer explaining? So I could also receive her as accepted.

1 answer

2

How to git-clone a project:

git clone remote-url-do-repo
cd nome-do-projecto
git fetch
git checkout master


Step One clones the project into your machine, into a folder with the project name, from the folder where you are. I mean, if you’re in /home/username/ and the project is called xpto this command will create the folder xpto inside the briefcase /home/username/.

The second command is for entering the folder (cd = Change Directory) that you just cloned.

The third command (fetch) serves for git to fetch all branches, etc, etc.. that exist.

The last command makes you do checkout to the branch master

Browser other questions tagged

You are not signed in. Login or sign up in order to post.