The scenario:
git add
, git commit
and git push
Is this somehow possible with git? I wasn't able to find anything that would work nor was I able to figure it out. With SVN I just did svn up file
and voila.
GitHub lets you download one file from a repository. This is a useful feature because it means you do not have to clone or retrieve an entire repository to download a particular file. You cannot retrieve a single file using the git command line, even if your repository is hosted on GitHub.
DESCRIPTION. Updates files in the working tree to match the version in the index or the specified tree. If no paths are given, git checkout will also update HEAD to set the specified branch as the current branch.
It is possible to do (in the deployed repository)
git fetch git checkout origin/master -- path/to/file
The fetch will download all the recent changes, but it will not put it in your current checked out code (working area).
The checkout will update the working tree with the particular file from the downloaded changes (origin/master
).
At least this works for me for those little small typo fixes, where it feels weird to create a branch etc just to change one word in a file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With