Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6082915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:20:32+00:00 2026-05-23T11:20:32+00:00

I set up a github repository a while ago: https://github.com/LiamBailey/TweetSlider , with code for

  • 0

I set up a github repository a while ago: https://github.com/LiamBailey/TweetSlider, with code for a little jQuery script to pull recent tweets for a given user and display them in a slider. Now I have added a few new features, and also made it a jQuery plugin. The first version was called TweetSlider v1 and the second is called TweetSlider v2.1.

First question: What should i do to add this new version to github, overwrite the existing code with the new, or create a fork for the new version?

If I should create a fork I have found the documentation for that and can manage to do that, but if I am to overwrite, which is what I have assumed I should do, then I am in a spot of bother.

Since creating the repository I have changed computers, and no longer have access to the local version of the original repository. How can I reconnect the repository to a new local directory and delete the existing files? Once I know how to do that I have found the documentation to recommit the new files.

I hope someone can help with this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:20:32+00:00Added an answer on May 23, 2026 at 11:20 am

    The number one rule is: Never develop anything without a version control system 🙂

    I don’t know how exactly did you develop the second version – do you have it under version control in Git repository? Did you based the second version on the top of commits of the first version?

    However, you can add GitHub as a remote repository (which probably answers “How can I reconnect the repository to a new local directory”) in case that local directory is existing Git repo (which you can establish with git init command).

    git remote add origin git@github.com:LiamBailey/TweetSlider.git
    

    And the organization of your repositories is up to you – it depends if the original version still makes sense to use, if the new version has some backwards compatibility breaks etc.

    If you want to have them as separate repositories, go for it.

    If you want to replace the old version with the new one in the same repository, you have to options:

    Dirty way – “backup” the old version to some branch and make a commit with the new version in master.

    git init
    -- copy the new version to this directory--
    git add .
    git commit
    git remote add origin git@github.com:LiamBailey/TweetSlider.git
    git fetch origin
    git checkout origin/master -b v1
    git push origin v1
    git checkout master
    git push -f origin master
    

    Clean way – clone the original repo and make logical steps you did while developing the second version – each of this steps should be a separate commit. At the end you should have the new version with a nice history of commits.

    git clone git@github.com:LiamBailey/TweetSlider.git
    cd TweetSlider
    -- make changes to your source code --
    git add .
    git commit
    -- repeat until you have the second version --
    git push origin master
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using popular jquery Cookie plugin https://github.com/carhartl/jquery-cookie Wonder how to set and read
I'm trying to set up my own http openwrap repository. I've read https://github.com/openrasta/openwrap/wiki/Openwrap-publishing-protocol but
I am trying to set up a private repository of Android source code while
(NOTE: Source code here https://github.com/cthielen/dss-evote ) I've got a simple voting application. A survey
I followed this tutorial: https://github.com/EllisLab/CodeIgniter/wiki/PDF-generation-using-dompdf However, I can't seem to set the path right.
I've been using for a while a small git repository that has been set-up
Greetings, I recently set up a GitHub repository and installed Git on my system.
I would like to set a tag in my github repository to a specific
I've already set up a Git repository on GitHub and committed a few changes
I have a public repository on github that I'm having trouble handling pull requests

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.