Skip to main content



To share this code with your teammates, you’ll want to create a shared Git repository that you can all access. One way to do this is to use GitHub. Head over to, create an account if you don’t have one already, and create a new repository. Configure your local Git repository to use the new GitHub repository as a remote endpoint named origin as follows:
git remote add origin<YOUR_USERNAME>/<YOUR_REPO_NAME>.git
git push origin main
git pull origin main

# Create local repo server
#git init --bare 

change remote repo url:
git remote -v
# View existing remotes
# origin (fetch)
# origin (push)

git remote set-url origin
# Change the 'origin' remote's URL

git remote -v
# Verify new remote URL
# origin (fetch)
# origin (push)

Git reset & revert:
# restore and revert:

#git log --oneline
#git revert commit_hash

#git restore -s commit_hash file(s)
#git reflog


Popular posts from this blog

Salt -- cheat sheet

      The Salt system is a Python-based open-source remote execution framework for configuration management, automation, provisioning and orchestration.  A basic Salt implementation consists of a Salt master managing one or more Salt minions.

Cheat Sheet

Bash: echo $? - exit status of last command (0 no error) ' - Single quote removes meaning special meaning of special character. find /qwe -type f -iname *.js -exec cp --parents -t /tmp/ {} + -- find all js files and copy with parent directory ystemctl set-default (ls -l /lib/systemd/system/runlevel*) -- set runlevel echo <password> | sudo -S for i in t@01 st@02 ba@sta03;do ssh -o RequestTTY=true $i "sudo -l";done -- allow tty present VIM: :r! sed -n '16,812 p' < input_file.txt -- copy line range from input_file :1,10d -- delete line from 1 to 10 :se nu -- show line numbers Apache: Redirection in Apache (By default, the Redirect directive establishes a 302, or temporary, redirect.): URL: <VirtualHost *:80> ServerName Redirect 301 /oldlocation </VirtualHo