Send local repository to remote repository

Asked

Viewed 3,085 times

1

Hello.

I want to send my project called sfp to bitbucket.

I didn’t create this project or repository there at the bit, but I want to know if it is possible to already send and create the Repo at the same time.

For example: I type the command more or less like this:

git remote add sfp git:/bitbucket.org/andre_sn/sfp.git

And already create the repository. Then I just push. I’m not getting it, as I do?

  • for all I know you have to commit before you push. then go to bitbucket and make tbm commit in your repository.... before a commit you should always push.

  • for me to commit I need to have the repository created the same way. Then we come to the conclusion that there is no way to create a repository by terminal or graphical interface, just by page.

  • There is a tool to create Repos from the https:/hub.github.com/ command line but only supports Github. A good explanation of how to use http://blog.caelum.com.br/github-na-command-line/

1 answer

1


Being quite simple, there are some ways to publish your project in bitbucket, certain that you’ve already downloaded the git Bash( line code ) and Git GUI (Graphical Interface) tool, a very simple way is to follow this sequence here in git bash, you are required to have a repository created in bit.

// Va na pasta do projeto e inicie o git
git init

// Diga para o git o caminho do seu acesso remoto
git remote add origin https://[email protected]/dfps/teste-novo.git


//Crie seu primeiro arquivo, faça commit e push 
echo "Diego Santos" >> texto.txt

git add texto.txt
git commit -m 'Comentarios a respeito do arquivo'

// Aqui ele faz a magica de jogar pra bitbucket
git push -u origin master 

If you need more details just ask!

  • and to add all the files, it’s git add .?

Browser other questions tagged

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