- How to fork a repository
- How to clone and branch
- How to make commits and push changes
- How to create a Pull Request
- How to resolve merge conflicts
dev-tips/
└── tips.md
└── contributors.md
└── README.md
└── .gitignore
Follow these steps carefully
Click the Fork button at the top right of this page.
This creates a copy of this repo under your GitHub account.
Your fork will look like:
https://github.com/<your-username>/dev-tips
Note: Make sure you have SSH keys set up with GitHub. If not, follow GitHub's SSH setup guide.
Open a terminal and run:
git clone git@github.com:<your-username>/dev-tips.gitThen navigate into the folder:
cd dev-tipsAlways create a new branch for your changes:
git checkout -b add-my-tipAdd your tip at the bottom of the file like this:
- Always write meaningful commit messages. *(Added by Chandrima Hazra)*Then, add your name to the contributors.md file:
- Chandrima Hazragit add .
git commit -m "<commit message here>"git push origin add-my-tip- Go to your fork on GitHub.
- You'll see a prompt to "Compare & pull request".
- Click it, add a short description, and submit your PR.
Wait for the maintainer to review and merge your contribution. A PR should have a proper description of the changes to make it easy for the maintainers to understand your changes.
If you see a merge conflict:
-
Pull the latest main branch:
git pull upstream main
-
Resolve conflicts manually in your file.
-
Add and commit again:
git add . git commit -m "Resolved conflict" git push origin add-my-tip