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 9295181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:32:45+00:00 2026-06-18T21:32:45+00:00

I like to remove repos that I’m not working on from my computer. I

  • 0

I like to remove repos that I’m not working on from my computer. I check something out, I work on it and when I’m finished I push everything and delete the folder from my computer. That way things stay tidy, it’s easy to get an overview of what I’m actually working on and I know that I don’t have any local stuff waiting to be pushed.

But…

Before deleting my local repo I want to make sure everything has been pushed to my remote. The process I go through is usually these three steps:

git st    # check if there's something I haven't committed

git stash list    # check if I've stashed something

git log --oneline --decorate --all    # check if all branches have been pushed

I would like to simplify this. Especially the last step, which requires me to look at all my branches and see if the local and the remote ones are in sync. To be really sure, I might even have to scroll down a bit to make sure I’m not missing anything.

I’m considering writing a script for doing all of this automatically, but maybe there’s a solution out there already? (I take it I don’t have to emphasise that I want this done on the command line and not using any fancy GUIs :D)

How do you guys approach this? What’s your process for checking that you’re not forgetting anything? What tools do you use? All ideas are welcome!

  • 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-06-18T21:32:46+00:00Added an answer on June 18, 2026 at 9:32 pm

    To know if a local and a remote branch are in sync you need to compare the hashes of the HEAD revisions.

    When you execute git branch -v -a you will receive a list of local and remote branches along with the hashes of the corresponding HEAD revisions:

    $ git branch -v -a
      develop                             44e61b5 <Commit message>
      feature/CodeContracts               c26edee <Commit message>
    * feature/Foo                         3a40e22 <Commit message>
      master                              e68e28a <Commit message>
      remotes/origin/HEAD                 -> origin/master
      remotes/origin/develop              44e61b5 <Commit message>
      remotes/origin/feature/Bar          be9666c <Commit message>
      remotes/origin/master               e68e28a <Commit message>
    

    As you can easily see, develop and master are up-to-date locally and remote, feature/Bar doesn’t exist locally and feature/CodeContracts and feature/Foo don’t exist remotely, so they should be pushed before deleting the local repository.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose we'd like to remove duplicate values from a vector of int s. The
I'd like to remove every \n symbol from every single array element. But after
I would like to remove all lines from a textfile which contain a certain
I would like to remove the configuration out of my app.js and split it
I would like to remove all twitter nicknames (@xxx) from a string like this:
I would like to remove the queries information from the website. I am using
I'd like to remove the popup message 'Sorry this video cannot be played' from
I would like to remove from Mac OS-X taskbar (Dock) the XCode's recent project
Ok, I have three different computers that I work from and right now their
I would like to remove all trailing zeros without truncating or rounding the number

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.