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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:13:18+00:00 2026-06-18T15:13:18+00:00

We use Git to manage and deploy code. I’m on the Ops team and

  • 0

We use Git to manage and deploy code. I’m on the Ops team and I do deployments. Our developers make changes and push code into Github, and we (Ops) use some managed processes to pull production code and deploy it.

The process is like this:

Background

  • Developers do stuff. That stuff ends up in Github and the Devs tell us so.
  • We have a local “staging” clone, and a local “deployment” bare git repo. The local git clone has two remotes, Github as “origin” and the local bare repo as “deploy”
  • We use chef on the web servers to actually deploy the code via the chef git resource that pulls from the “deploy” remote
  • We have the “deploy” remote so that there is a gating mechanism between Dev finishing stuff and our deployment timing. (Rather than deploying from Github directly)

Actual deploy Process

  1. cd into local clone
  2. git checkout branchname
  3. git pull origin branchname
  4. git push deploy branchname

All of this is partially automated, and is moving to full automation. As such, we are careful to not ever make local changes to the staging clone, and we expect that the output of git status in that clone will only ever be nothing to commit (working directory clean)

However, we had a weird message come up this week. The deploy clone is stating that it is 80 commits ahead of origin! Even though it also says nothing to commit.

# On branch branchname
# Your branch is ahead of 'origin/branchname' by 80 commits.
#
nothing to commit (working directory clean)

Finally, there isn’t really a problem, per se. The commit SHA256 hash matches in this clone, and on the deployed code on all of the web servers. I didn’t do an actual rsync comparison, but I’m pretty confident that the actual code itself is deployed correctly.

I want to know how this could happen, if it is bad, and how to clean it up short of deleting the local clone and starting over.

  • 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-18T15:13:20+00:00Added an answer on June 18, 2026 at 3:13 pm

    If both deploy and local repos have been cloned from the same ‘origin‘ (GitHub), your process shows that only local is doing a git pull origin.

    The repo deploy never fetches anything from origin (it only receives commits from local).
    That means deploy still believe having commit that would not be on origin (at least the origin it knows about).
    A simple git fetch origin executed from the deploy repo would make that status cleaner.

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

Sidebar

Related Questions

We use git to manage our code, and just create one tag when release
We are looking to use GIT to help manage our web files as we
I use GIT to manage my project's source code, using SourceTree locally and BitBucket
Our situation: We want to use git to manage our project files. So we've
I have been working on some code, which I use git to manage. Earlier,
I use git to manage my dotfiles, I use both linux and mac osx
I'd like to use git to manage my various Visual Studio projects. Unfortunately they
I use git checkout -b somebranch origin/somebranch to make sure my local branches track
I frequently use git stash and git stash pop to save and restore changes
I am attempting to use git to manage deployment to my live website. The

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.