Skip to content

AminaHasanaath/git-Practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

git-Practice

πŸ”₯ Sure β€” here’s a professional README.md for your GitHub/Git cheat sheet repo. This is ready to be added to your repo and looks clean + informative.


πŸ“„ README.md β€” GitHub Control Command Sheet

# πŸš€ GitHub Control: Pro Git + SSH Command Sheet

This repository contains a complete cheat sheet of essential Git and GitHub commands β€” tailored for secure, SSH-connected development used by real-world backend, AI, and open source developers.

---

## πŸ“¦ Git Global Setup

```bash
git config --global user.name "Your Name"
git config --global user.email "your@email.com"

πŸš€ First-Time GitHub Push (New Project)

cd your-project-folder
git init
git remote add origin git@github.com:username/repo.git
git add .
git commit -m "initial commit"
git branch -M main
git push -u origin main

πŸ” Daily Push / Pull Cycle

git add .
git commit -m "your commit message"
git push
git pull origin main

🌿 Branching Workflow

git switch -c feature-branch    # create + switch
git switch main                 # switch back to main
git merge feature-branch        # merge into main

🧠 Stashing & Reverting

git stash           # temporarily save work
git stash pop       # restore saved work

git revert <commit> # undo a specific commit safely

πŸ“œ Commit History & File Tracking

git log --oneline      # compact commit history
git status             # check modified files
git ls-files           # list tracked files
git ls-files | wc -l   # count tracked files

πŸ’ Cherry-Pick a Commit

git cherry-pick <commit-hash>

πŸ›°οΈ Cloning Repos

git clone git@github.com:username/repo.git

πŸ” SSH Key Test (One-time setup)

ssh -T git@github.com

🚫 Recommended .gitignore Entries

*.log
*.class
.env
node_modules/
__pycache__/

🧠 When to Use This?

  • Starting a new project
  • Uploading work-in-progress code
  • Collaborating with teammates
  • Avoiding login issues via SSH
  • Managing .env secrets
  • Fixing broken commits or pulling updates

πŸ‘¨β€πŸ’» Made For

Backend developers, AI engineers, and system designers who want full control of their GitHub workflow.


πŸ“Ž Author

Aven Hasanaath GitHub: @hasanaath27


πŸ“Œ Star the repo to bookmark this cheat sheet for life.


---

βœ… Copy-paste this into `README.md` inside your Git command repo.

Want me to also auto-generate this as a `.md` file and push to your repo for you (manual steps)?

About

Git & Github Control

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published