GeekCoding101

  • Home
  • GenAI
    • Daily AI Insights
    • Machine Learning
    • Transformer
    • Azure AI
  • DevOps
    • Kubernetes
    • Terraform
  • Tech
    • CyberSec
    • System Design
    • Coding Notes
  • About
  • Contact
Where Curiosity Meets Code!
Start your tech adventure one line of code at a time.
Coding Notes

Git Notes

Hi there! Recently, I've spent some time to organize my git commands notes. I know you can find those commands online easily, but I would like to share these what I think useful and put them together here for my own references. Let's take a look! General Settings You will notice that, for each commit, it has both author name and committer name. Branches Operations Command Get current working branch git branch Checkout specific branch git clone -b specific_branch --single-branch http://username@192.168.99.100:8080/scm/your-repo.git Create a branch git checkout -b new_branch Push to remote branch git push origin remote_branch Delete local branch git branch -d <branch> Delete remote branch git push origin :[name_of_your_new_branch] Fast-forward merge Git Clone Clone into current directory Git Checkout Check out files deleted locally Sometimes, you might accidently delete some files in your local repos. Then you can use below command to pull them back from remote: Clone a subdirectory only of a Git repository What you are trying to do is called a sparse checkout. This creates an empty repository with your remote, and fetches all objects but doesn't check them out. Then do: Now you need to define which files/folders you want to actually check out. This is done by listing them in .git/info/sparse-checkout, eg: Last but not least, update your empty repo with the state from the remote: You will now have files "checked out" for "temp" folder on your file system, and no other paths present. Clone specific branch of a Git repository Just use singel-branch option: Git Remote I was wondering what is a git remote, here is:…

January 6, 2018 0comments 533hotness 0likes Geekcoding101 Read all
1…34567
Newest Hotest Random
Newest Hotest Random
Secure by Design Part 1: STRIDE Threat Modeling Explained Kubernetes Control Plane Components Explained A 12 Factor Crash Course in Python: Build Clean, Scalable FastAPI Apps the Right Way Golang Range Loop Reference - Why Your Loop Keeps Giving You the Same Pointer (and How to Fix It) Terraform Associate Exam: A Powerful Guide about How to Prepare It Terraform Meta Arguments Unlocked: Practical Patterns for Clean Infrastructure Code
A 12 Factor Crash Course in Python: Build Clean, Scalable FastAPI Apps the Right WayKubernetes Control Plane Components ExplainedSecure by Design Part 1: STRIDE Threat Modeling Explained
Why is the Transformer Model Called an "AI Revolution"? ExternalName and LoadBalancer - Ultimate Kubernetes Tutorial Part 5 7 Key Insights on the Self-Attention Mechanism in AI Magic Terminal Mastery: Crafting a Productivity Environment with iTerm, tmux, and Beyond Git Notes Discovering the Joy of Tokens: AI’s Language Magic Unveiled
Newest comment
Tag aggregation
AI Machine Learning security Daily.AI.Insight cybersecurity Supervised Machine Learning notes Transformer

COPYRIGHT © 2024 GeekCoding101. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang