when you want to check the difference between your file (OR you want to revert files to the original version):
- Warning: This command is actually reverting, but read why I suggest this as diff check.
git checkout origin/master *
Wildcard works. * means you’re going to search every file.
If you want to do this to specific files, do like this:
git checkout origin/master code/*atmos*.dm
This will detect every dm files that have atmos:
(these are examples)
If you want to compare a single file, do this:
git checkout origin/master code/somepath/very_specific_file.dm
WARNING: Again, doing this means you’re reverting the files to the master’s status. Make sure you made a commit before doing this, or you’ll lose the progress.
why do you use
git checkoutinstead of
this is when you do
git diff. This is bad to read to recognise the difference.
git checkout is actually reverting feature, but it’s incredibly good to compare what’s different.
git pull https://github.com/SOMEONESFORK/BeeStation-Hornet.git BRANCHNAME
- You’re going to test Powerfulbacon’s code
- their fork name is
- their branch name is
- then it becomes
git pull https://github.com/powerfulbacon/BeeStation-Hornet.git dynamic_ship
(of course, they should push that into github online)
- ta-da, you pulled someone’s code!
- You want to compare it with master? then
git checkout origin/master *- It’s told at first.