ACM-IGDTUW / Open-Source-Challenge

Advaya'20 The Open Source Challenge
8 stars 30 forks source link

Task 2: Make your first PR #20

Open lisa761 opened 4 years ago

lisa761 commented 4 years ago

Markdown is a lightweight markup language that you can use to format elements to plaintext text documents. The README file you see at the beginning of this repository is also a markdown file. In this Task 2 of The Open-Source Challenge, you will play around with creating a markdown file and making a pull request. Make sure you completed the task 1 before proceeding further:

So the task is as follows:

  1. Enter the project directory Open-Source-Challenge using the cd command and run git status. The output should be something like this:
    On branch master
    Your branch is up-to-date with 'origin/master'.
    nothing to commit, working directory clean
  2. Create a branch and switch to that branch using: git checkout -b <your GitHub username>-task2

For example: git checkout -b john12-task2

Now, the output of git status should be:

On branch john12-task2
nothing to commit, working directory clean
  1. Being inside the project directory, run

For Linux/Mac: touch participants/<your-GitHub-username>.md For Windows: echo $null >> participants/<your-GitHub-username>.md

For example: touch participants/john12.md These commands are used to create empty files. We created a john12.md file inside the participants folder of the project.

If you get a No such file or directory error in the above command, run these commands:

git checkout master
git fetch upstream
git rebase upstream/master
git push origin master
git checkout <your-new-branch-name>

You will have to type your GitHub username and password for the last command.

  1. Open the project in your favorite text editor. To open the project in VScode, run code . inside the project directory in the terminal.

  2. In your text editor, go to the file you just created in the previous step. That file would be inside the participants folder. And add the following details in the file you created (in my case it's john12.md) and save it:

    Name: <your name>
    GitHub username: <your GitHub username>
    University: <University name>
    Year: 
    Branch: 

    Note that Windows does not support .md files, so you will absolutely have to use a text editor.

  3. On the terminal, inside the Open-Source-Challenge project directory, run:

    git add .
    git commit -m "add participant-<name>"
    git push origin <your-branch-name>

    In my case, the last command would be:

    git push origin john12-task2

    Complete the procedure by entering GitHub username and password.

Here the add . command adds all the changed files to a staging area. Its the area where git keeps track of changes made to a file. If the files are not added to the staging area, they are not tracked by git.
The commit command writes those changes into the history of your project. That means that you have set the current changes as a type of low-key landmark so that you can return to this version of your project whenever you wish to.

  1. Now go to your forked repository on GitHub. You will see a New branch pushed inside a yellow colored box. Next to it would be a Create Pull Request button. Use that to create a Pull Request.

    Done! We will see your PR as a submission.

Remember that any technical doubts will be answered only through the issues created in the repository. This is an important rule that you must follow.

mishra-aanchal commented 4 years ago

https://user-images.githubusercontent.com/48357016/79215209-e90f1600-7e68-11ea-8701-1d04bdd441bc.png i'm stuck here! please help. why is it not allowing to modify?

lisa761 commented 4 years ago

Hi @mishra-aanchal Can you open another issue for this? I will get back to you there. Lets not discuss it here in case the conversation gets longer.