Git setup instructions to make contributions to the repository.
Download the latest version of Git
.
Create a folder to clone the repository.
Open the terminal and run the following git command:
git clone https://github.com/venkys-io/Code-Blogs.git
If this is the first time using git. A browser tab pops up to login into your GitHub account.
and set the default config username and email. This is necessary to make any commits on the repository.
git config --global user.name "yourUserName"
git config --global user.email "YourEmailId@gmail.com"
Change to the repository directory on your computer (if you are not already there):
cd Code-Blogs
make sure you are in the correct directory.
C:\Users\....\Code-blogs\>
Now create a branch using git checkout
command:
git checkout -b "yourBranchName"
you will be switched to your branch.
Now write your blogs.
Open vs-code in the repository.
Shortcut:
C:\Users\....\Code-blogs\> code .
To create a blog for the program programs-prod/algorithms/Arrays/Easy/Palindrome
Create a README.md
file as specified format.
Example:
Code-Blogs └───Arrays ├───Easy │ └───Palindrome | └───README.md └───Medium
Now write the blog in markdown
.
To know more about markdown. visit
Even though you have created a file. Git
actually doesn't track those files.
you can check the status of your branch. using git status
command.
git status
It displays all the changes you made on the branch.
Add those changes to the branch you just created using the git add
command:
git add .
Now commit those changes using the git commit command:
git commit -m "your commit message"
push the changes using the command git push
git push -u origin your-branch-name
replace your-branch-name with the name of the branch you created earlier.
- Note: You might get Authentication errors if it was your first time.
Now open GitHub to see those changes.
Now open pull request
tab on GitHub repository.
Hit on Compare & Pull request.
Mention your changes.
Hit on create pull request.
It is good a have knowledge on Git, GitHub.
Here are few free resources. You can try.