Send local repository to remote repository

1

Hello.

I want to send my project called sfp to bitbucket.

I did not create this project or repository there in 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 something like this:

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

And already create the repository. That's why I'm pushing. I'm not getting it, how do I proceed?

    
asked by anonymous 14.12.2015 / 13:38

1 answer

1

There are a few ways to publish your project on bitbucket, since you have already downloaded the git Bash tool and Git GUI (Graphical Interface), a very simple way is to follow this sequence here in the git bash, you are required to have a repository created in the 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!

    
14.12.2015 / 14:38