• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Gokul Deepak

Gokul Deepak

GoCool and Debug

  • Home
  • WordPress
  • Android
  • How to
  • About Me

Git Command Cheat Sheet from basic to advance

August 25, 2020 by Gokul Deepak S Leave a Comment

Here Let me use this page as git command cheat sheet.

Git global setup

git config --global user.name "Administrator"
git config --global user.email "[email protected]"

Create a new repository

git clone http://192.168.2.151:8081/root/test1.git
cd test1
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

Push an existing folder

cd existing_folder
git init
git remote add origin http://192.168.2.151:8081/root/test1.git
git add .
git commit -m "Initial commit"
git push -u origin master

Push an existing Git repository

cd existing_repo
git remote rename origin old-origin
git remote add origin http://192.168.2.151:8081/root/test1.git
git push -u origin --all
git push -u origin --tags

Filed Under: Git

Authored by Gokul Deepak S

Leave a Reply Cancel reply

0 Comments
Inline Feedbacks
View all comments

Primary Sidebar

Popular Pages

  • How to find the date of the Facebook group it was created
  • CORS error in Apache Tomcat - Solved
  • Home
  • How to install OwnCloud on Bluehost
  • How to block access to the wp-content uploads folder
  • How to add ads.txt on Bluehost
  • Elementor Plugin and Nginx Configuration
  • Combine two separate files line by line in Notepad++
  • WordPress - Display Ads only on posts not on pages

Archives

Categories

  • Android
  • Apache
  • Blogger
  • Computer Tips
  • DevOps
  • Earn
  • Facebook Tips
  • Git
  • Google Tips
  • How to
  • Laptop Tips
  • Laptops
  • Linux
  • Mobile
  • MongoDB
  • Nginx
  • Notepad++
  • PostgresQL
  • Ubuntu
  • Wordpress
  • Xenforo

Tags

Android Android One Bluehost Comparisions Custom ROM Elementor Facebook Genesis Genesis Sample Theme Google Drive How to Lineage OS OnePlus One OwnCloud Rooting Smartphones Stock ROM Studiopress Tomcat Wordpress plugin

Copyright © 2022 ยท Maintained by GokulDeepak

wpDiscuz