How to put project in Bitbucket?

Asked

Viewed 23,199 times

4

I am trying to put my project in the teacher’s repository and I will end up getting no grade for failing, and I did the following procedures;

inserir a descrição da imagem aqui

he was doing well, but when he got to the last command he made a mistake as you can see;

inserir a descrição da imagem aqui

  • the repository has already been created? it is empty or already has content?

1 answer

8


Let’s assume you’re working with a previously created GIT repository that already contains some files.

Step 1 - Synchronizing the repository

Choose any folder from your system and type:

git clone ENDERECO_DO_REPOSITORIO

This address can be obtained in the upper right corner of the bitbucket, as shown below:

inserir a descrição da imagem aqui

Step 2 - Checking the differences

With the synchronized repository, you can edit/create the files needed to execute your demand. When you want to check the status of your local repository against the remote repository, use the following command:

git status

Step 3 - Adding new files

If you have added some new file to the repository, you need to add it to the list of GIT-managed files. This can be done using the following command:

git add .

Step 4 - Commit

After adding all the files, it’s time to perform the commit. For this, use the command:

git commit -am "mensagem explicando o que foi feito"

Step 5 - Executing additional changes

Are there new demands to be made? Just keep working normally. When finished just run steps 2 to 4 again. After the completion of all the demands, it is time to send the changes made to the remote repository. To do this, continue to step 6.

Step 6 - Sending the changes to the remote repository

If you’ve finished the job, it’s time to do the push. To do this just use the command:

git push
  • In the last command, only the master remote as upstream. Just run git push -u origin master the first time and git push the following times.

  • @Rodrigorigotti if you clone an existing repository, you don’t need to run git push -u origin master the first time. It will already be your default upstream.

  • I did an update on the post, in short when I went to put the last command to effect the commit gave error, I typed this git push -u origin master, help me there please

  • he asked for a password, when I put that it fails, I am putting the right password of my repository, but what I want to do is put my project in the teacher repository.

  • @wladyband if you follow step by step (and have access to the teacher’s repository), it will work perfectly.

  • sorry Romulo, but you saw the update of my post? based on the last figure I put what should be happening? I need your understanding, please.

  • I don’t have access to the professor’s repository, I want to put my project in his repository without me needing his password, you understand me?

  • @wladyband you don’t need his password to gain access to the repository. Just add your user to their repository with write permission. The password you will use is your own.

Show 3 more comments

Browser other questions tagged

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