Good day!

The situation is this: there is a project that lies on a remote server, I make all the changes on the local machine, then with Git I send the changes to the server, there is a designer who does not know how to work with Git and makes edits to production.
I have to go to the server to add all designer edits to the repository, and then pull changes into my local version of the project.

I want to stop merging the designer’s changes in production, and do it on my local machine, and then send everything to the remote server in one fell swoop.

Is there any tool in Git that can be used to pull uncommitted changes?
Maybe there is some other way to work as a team in this situation?

Thanks in advance for your answer / advice.

PS

Captain's Answer : Teach the designer to use Git.

  • eight
    And the option to give the designer a script (or batch file) that will do everything for him and without an understanding of the work of GIT, is not suitable? - Alex Krass
  • 6
    If there is an opportunity to select access to production, then point the designer to the web interface of the repository on githab or your own type of gitlab, with which he can edit the online editor to make and, if desired, fasten a web hook to the commit to publish edits automatically. Alternatively, you can teach several commands in the GUI to execute (pull, add, commit, push). Trying to catch local changes with git diff , inotifywait is not productive. This is not a healthy work environment, if a person who can break the system does not take any responsibility for the repair. - jfs
  • Why dizu git? Create a folder / psd add it to git ignore and work with the designer via ftp, ssh - ferrari
  • @ Oleg B sorry not uchtonil, by the designer, I mean not only the creator of .psd templates, but also the layout designer - zsiteru
  • one
    @zsiteru, If you are given an exhaustive answer, mark it as correct (click on the check mark next to the selected answer). - Nicolas Chabanovsky

1 answer 1

If he is also a coder (and maybe a frontend developer), then without a geeta it’s hard, set up his .ssh key so that you don’t need to enter any passwords and teach this command: git add . && git commit -am 'frontend development' && git pull origin master && git push origin master git add . && git commit -am 'frontend development' && git pull origin master && git push origin master - explain that this will be something like "save your changes and pour out". In the console of the guitar it will be enough for him to type "up" and "enter" and that's it. :)

If about the "batch file", the meaning is as follows:

  • find the folder where git is installed, I have this C:\Program Files (x86)\Git\bin ;
  • list item;

  • add "environment variable" (PATH): Панель управления > Система > Дополнительные параметры > Переменные среды > ;

  • select the parameter PATH and append through ; let this one go to the gita;
  • create a file, for example, apply.bat , and write it there:

    git add. && git commit -am 'frontend development' && git pull origin master && git push origin master

Do not forget to change the branch to yours.