This week 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.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 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.
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 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
And I continued with the some of the following steps:
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.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.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 isgit@github.com:ranms25/open-source-by-organizations.git
. This command is typically used when you want to push changes to a forked repository.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 rungit 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!
Top comments (0)