d2321
5/15/2020 - 11:20 AM

GIT

git remote add origin https://andr@bitbucket.org/andr/terminal.git
git remote set-url origin git@bitbucket.org:andr/terminal.git

C:\Users\User\.ssh

ssh-keygen -t rsa -C "andr@gmail.com"
ssh-keygen -t rsa -b 4096 -C "andr@gmail.com"

git pull --no-ff origin master

git config --global user.name "D. Andr"
git config --global user.email "andr@gmail.co"
git config --list

git remote -v //info about origin

git branch -D nameBrunch

git push origin --delete contact //REMOTE
git branch -D contact //LOCAL

git rm --cached file.php - deleting from repository, but keeping on local machine

if remote has several branches and we clone repo, in local will only master
git branch
git branch -a //all (with REMOTE)
we can see other branches, then git checkout nameBranch, and get it from remote

git log --all --decorate --oneline --graph -10

------------------------------------
https://stackoverflow.com/questions/10678495/where-to-find-changes-due-to-git-fetch
https://stackoverflow.com/questions/3833561/why-doesnt-git-ignore-my-specified-file/3833675
https://stackoverflow.com/questions/14513278/git-merge-after-fetch-how-exactly
on local create own branch. working in this branch (add ., commit -m, git push origin OWN).
then on HOSTING (github, bitbucket) - must to make PULL REQUEST. as a result we get an UPDATE master branch on HOSTING. After pull request delete Own branch in HOSTING
git push origin --delete OWN //REMOTE
then in local we still have our OLD master. we need to switch to our old master branch. and delete LOCAL own branch git branch -D contact //LOCAL
then in master git pull. and we are up to date.