0

Hello Stackoverflow and hello to all the developers . Sir actually i am running in a problem . I've hosted my new blog website on a linux vps , and when i hosted that it was just a bare minimum , now it's running perfectly on that vps and on my computer i am trying to add more features to it . but there is a problem when i push all changes to github and pull that changes to that vps it will changing my settings file , which is extremely important . now i am looking for a solution that i can pull single file changes not entire . for example

i made image responsive in style.css file okay and push that change to github how can i download that single change, single file change or that single file (style.css) to that vps?

if you will help me i will be very gladful to you

  • That's not what git was designed for. Consider to have multiple setting files or not tracking the settings in git. – Klaus D. Sep 04 '21 at 05:35
  • How can i do that , well i would like to tell you that i am developing that project using django and python. how can i ignore settings.py commit changing? please share me the details –  Sep 04 '21 at 08:29

2 Answers2

1
git fetch --all
git checkout origin/master -- <your_file_path>
git add <your_file_path>
git commit -m "<your_file_name> updated"

First checkout to branch from where you want to pull.

0

This is similar to this question: Git: How to pull a single file from a server repository in Git? So.. git fetch then git checkout (-p|--patch) [] [--] […​] see https://git-scm.com/docs/git-checkout

SystemsInCode
  • 629
  • 7
  • 19