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

  • Home
  • SEARCH
  • 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 7656031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:39:57+00:00 2026-05-31T12:39:57+00:00

I have a server where there’s some config that I don’t properly know where

  • 0

I have a server where there’s some config that I don’t properly know where i just git pull and it gets what is in a github repo, then restart it in order to deploy.

The thing is, there’s a commit which isn’t my latest, that isn’t really on my server. The files aren’t in .gitignore. How do I assure that a pull, pulled a commit?

I really don’t know how to fix it, I’m thinking about restarting everything 🙁

14:41][root@someserver] someserver_dir (master)$ git status
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   Gemfile
#   modified:   Gemfile.lock
#   modified:   config/assets.yml
#   modified:   config/database.yml
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   randomfiles
  • 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-31T12:39:58+00:00Added an answer on May 31, 2026 at 12:39 pm

    If you always want your server version to reflect a commit from your repo, it’s probably better to use git reset instead of git pull – that way you never invoke merge functionality, but instead set all of the files to exactly what they are in the commit you reset to. For example:

    git fetch origin master
    git reset --hard FETCH_HEAD
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way that I can have a server control MyControl<T> so that
I have a feeling that there must be client-server synchronization patterns out there. But
I have an iPhone app out there that calls home to my server every
Is there a method of accessing an Exchange server that does not have IMAP
i have server and there i have store the some data for eg;username is
hi friend can any one tell me that i have web server there i
hi friend can any one tell me that i have web server there i
On the network where I have my web server there is a machine that
I have a server application with such structure: There is one object, call him
In Team Foundation Server is there a way to have work items in one

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.