It is necessary to add to the existing project some differences from the repository on GitNub.
I run the git diff origin/master master
and get an insanely long tape of differences.
Question: how to add changes only to some files?
1 answer
For the diff command, you can specify "scope": after all options and parameters, list an arbitrary number of files / directories.
In order to “facilitate” the work of the git program and clearly separate the options / parameters from the file / directory list, it is better to insert a special option in front of the list.
eg:
$ git diff опции-и-параметры -- файл1 каталог1 каталог2/файл2 ...
|
--
- Nofate ♦