Welcome to this beginner-friendly guide to Git and GitHub. This repository is designed to help new developers understand the basics of version control and collaboration through Git and GitHub.
- What is Git and GitHub?
- How to set up Git
- Basic Git commands
- Working with branches
- Collaborating via GitHub
- Other useful Git features
- Open source contribution
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/your-username/your-repo.git
git push origin main
git branch new-feature
git checkout new-feature
git merge new-feature
git pull
git status # View file changes
git diff # View unstaged changes
git log # Show commit history
git stash # Save work temporarily
git reset --hard # Discard all local changes
Feel free to fork this repository and create pull requests. Contributions are welcome!
Happy coding! 💻✨