OSDC-2023-assignment7
Tags: osdc, github, git, html
Published: 2023-05-05 13:10:56

---
title: OSDC-2023-assignment7
published: true
description: 
tags: osdc,github,git,html
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-05-05 10:16 +0000
---


* [This week](https://github.com/OSDC-Code-Maven/osdc-2023-03-azrieli) we learned how to configure git-scm on Windows, including setting the default editor and configuring global and local repository settings. We also learned about the process of cloning, forking, and pulling repositories, as well as creating and pushing repositories to GitHub. Additionally, we were introduced to basic git workflows, including branching, adding, committing, and pushing changes to a repository. Finally, we learned about advanced git commands, such as rebasing and force pushing, to manage changes to a repository.

* This week's task was to take one project, set up the local development environment, and send a PR. 
I chose the [open-source-by-organizations](https://osdc.code-maven.com/open-source-by-organizations/).

* When I first set up the development environment, I ran into a problem towards the end with the command:
`python generate.py github/bioinform.yaml github/calgaryml.yaml`
I contacted @szabgab and he explained to me that he moved the files to a subfolder called 'data' and have not updated the README file
So I opened a [PR](https://github.com/OSDC-Code-Maven/open-source-by-organizations/pull/80) in order to correct the problem, in retrospect it would have been better to open issue and only then send the PR.

* In addition, after the aforementioned correction, I encountered another problem, this time I opened an [issue directly](https://github.com/OSDC-Code-Maven/open-source-by-organizations/issues/79).
After doing this I noticed that the main page of the project is written as a sentence:
"Currently there are 190 Corporations, 15 Non Profits, 216 Universities, 50 Governments, 2 Other organisations listed on our site."
And I thought it would be better to show it as a table. I opened a [PR](https://github.com/OSDC-Code-Maven/open-source-by-organizations/pull/81) and waiting to see what @szabgab thinks about it and whether it is worthwhile.

* Among the steps I did was go through the steps of setting up a development environment in the [README file](https://github.com/OSDC-Code-Maven/open-source-by-organizations/blob/main/README.md)
And I continued with the some of the following steps:

1. `git checkout -b ranms25/add`: This command creates a new branch called "ranms25/add" and switches to it. The `-b` flag tells Git to create the new branch if it doesn't already exist.

2. `vi index.html`: This command opens the file "index.html" in the Vim text editor. You can edit the file in Vim and save your changes by typing `:wq` and pressing Enter.

3. `git remote add fork git@github.com:ranms25/open-source-by-organizations.git`: This command adds a new remote called "fork" to your local Git repository. The remote's URL is `git@github.com:ranms25/open-source-by-organizations.git`. This command is typically used when you want to push changes to a forked repository.

4. `git push --set-upstream fork ranms25/add`: This command pushes your local branch "ranms25/add" to the remote repository "fork". The `--set-upstream` flag tells Git to set the "fork" remote as the default remote for the "ranms25/add" branch. This means that in the future, you can simply run `git push` without specifying the remote and branch names.

As a result, I did a git push directly after Gabor asked me to fix the code, and it had already been added to the new PR.
There was a lot we learned this week, and I feel that each lesson I am learning more and understanding more. I hope to continue learning in this way, keep following!