DEV Community

anatlavitzkovitz
anatlavitzkovitz

Posted on

1

osdc-2023-assignment5

How to make my own repository and edit it locally?

Unfortunately I missed lesson 4, but I was in Amsterdam so at least had some fun.
I decided to make my own R plot repository in GitHub, as I use R a lot and many times I repeat my code. I think this could be useful although I am sure there are many similar repositories.

How?
I wrote a first piece of R code and put that in a linux server which have R installed. I wrote a short R script and saved it, and did:

git status
git add 'main.R'
git commit -m "my first script in my new R rep0"

Enter fullscreen mode Exit fullscreen mode

Now I went to GitHub and opened a new repo.

back to the remote I wrote:

git remote add origin git@github.com:anatlavitzkovitz/visualization_with_R.git
git branch -M main
git push -u origin main

Enter fullscreen mode Exit fullscreen mode

but...
Permission denied (publickey).
fatal: Could not read from remote repository.

oh.... I forgot to add the ssh key to my GitHub keys.
After doing that (explained in more details here)- it worked.

I added a README file via GitHub with some details. It still needs a lot more work but I hope to add some more details and code soon.

##########

How to clone and make local changes to another open source project?

I entered some of my colleagues Shuly's repo
and Adi's repo and added
some issues.

now I want to make some pull requests to my friend's repos @shulyavraham:

git clone git@github.com:ShulyAvraham/LIMS_results_validation.git
git checkout -b addrequirements

Enter fullscreen mode Exit fullscreen mode

Now add some changed such as:
added #test to requirements.txt (not a very useful package..)

git add requirements.txt
git commit -m "updated requirements.txt"
git push

Enter fullscreen mode Exit fullscreen mode

ERROR: Permission to ShulyAvraham/LIMS_results_validation.git denied to anatlavitzkovitz.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

ha ha... I need to make my fork and than a pull request from there!

I went to Shuly's repo
and made a fork. back to my remote now:

git remote add fork git@github.com:anatlavitzkovitz/LIMS_results_validation.git

git remote -v
fork    https://github.com/anatlavitzkovitz/LIMS_results_validation (fetch)
fork    https://github.com/anatlavitzkovitz/LIMS_results_validation (push)
origin  git@github.com:ShulyAvraham/LIMS_results_validation.git (fetch)
origin  git@github.com:anatlavitzkovitz/LIMS_results_validation.git (push)

git push --set-upstream fork addrequirements

Enter fullscreen mode Exit fullscreen mode

now I have a pull request in my fork. send to Shuly!

Image of AssemblyAI tool

Challenge Submission: SpeechCraft - AI-Powered Speech Analysis for Better Communication

SpeechCraft is an advanced real-time speech analytics platform that transforms spoken words into actionable insights. Using cutting-edge AI technology from AssemblyAI, it provides instant transcription while analyzing multiple dimensions of speech performance.

Read full post

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay