GIT: mudanças entre as edições

De Wiki Clusterlab.com.br
Ir para navegação Ir para pesquisar
Sem resumo de edição
Linha 22: Linha 22:
git config --global credential.helper store
git config --global credential.helper store
</pre>
</pre>
 
=Revert a commit=
<syntaxhighlight lang=text highlight=1>
#Careful: git reset --hard WILL DELETE YOUR WORKING DIRECTORY CHANGES
git reset --hard HEAD~1
#or
git reset --hard <sha1-commit-id>
git push origin HEAD --force
</syntaxhighlight>
=Commands=
=Commands=
==List files==
==List files==
Linha 28: Linha 35:
git ls-files
git ls-files
</pre>
</pre>
=Bisu da Atlassian=
=Bisu da Atlassian=
*https://confluence.atlassian.com/bitbucketserver/basic-git-commands-776639767.html
*https://confluence.atlassian.com/bitbucketserver/basic-git-commands-776639767.html

Edição das 21h33min de 12 de julho de 2021

create a new repository on the command line

echo "# JAVALEARN" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/rocko83/JAVALEARN.git
git push -u origin master

push an existing repository from the command line

git remote add origin https://github.com/rocko83/JAVALEARN.git
git push -u origin master

Pull a repository

git pull origin master

Remember password

git config --global credential.helper store

Revert a commit

#Careful: git reset --hard WILL DELETE YOUR WORKING DIRECTORY CHANGES
git reset --hard HEAD~1
#or
git reset --hard <sha1-commit-id>
git push origin HEAD --force

Commands

List files

git ls-files

Bisu da Atlassian