Summaries/SE/Git/New Repo.md

972 B

title updated created
New Repo 2021-05-04 14:58:11Z 2021-05-04 14:58:11Z

New Repo

New repository when local reposity is created first

remote: create remote repository in regular way, with remoteRepoName

local:

git init
git add .
git commit -m 'Init version'
git remote add origin <ssh://git@bitbucket.org/gitbucketwillems59/**remoteRepoName**.git>
git pull origin master --allow-unrelated-histories   // merge remote with local
git push origin master    // simply push to repository

log

alias glog="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

# usage:
glog -n 5

Setup git

[git book])https://www.git-scm.com/book/en/v2/Customizing-Git-Git-Configuration)