Git tips

Need something from another branch, but you only need changes in 1 file?

Kalle Tolonen
10.4.2025

A couple of examples:

# replaces whole file in your working branch, but leaves your other work untouched
git checkout source-branch -- path/to/file

# We might need all the styling from another branch
git checkout source-branch -- *.scss *.css

Comments

No published comments yet.


Add a Comment

Your comment is held for review before it appears publicly.

Tick the box, then click Submit right away (Google expires the check after about two minutes).