DEV Community

0xkoji
0xkoji

Posted on

3 2

Let's Keep Your Fork Repo The Latest

Pre-condition

  • you have github account
  • you have git on your local machine
  • you have a fork repo
  • you have cloned the fork repo

In this post, I use https://github.com/memo/eco-nft as the original repo.

My forked repo is https://github.com/koji/eco-nft.git

set original repo

# add remote repo as upstream
$ git remote add upstream https://github.com/original_repo_you_forked

# check info
$ git remote -v
origin  https://github.com/koji/eco-nft.git (fetch)
origin  https://github.com/koji/eco-nft.git (push)
upstream    https://github.com/memo/eco-nft (fetch)
upstream    https://github.com/memo/eco-nft (push)
Enter fullscreen mode Exit fullscreen mode

fetch & merge

$ git fetch upstream

# merge upstream into my forked repo's master branch
$ git merge upstream/master
Enter fullscreen mode Exit fullscreen mode

push (to make a forked repo updated)

$ git push origin master
Enter fullscreen mode Exit fullscreen mode

remove upstream from remote

If you added a wrong url, you would need to remove it with the following command.

$ git remote rm upstream
Enter fullscreen mode Exit fullscreen mode

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay