- Identify the git hash for the first commit and the last commit that you would like to transfer.
- Run the following command in the repository that you would like to copy commits from:
git format-patch --output-directory="commits" sha1^..sha2. - Navigate to the repository that you would like to copy the commits into.
- Run the following command:
git am --keep-cr -3 /path/to/other/repository/commits/*.patch
Reset a single file to head:
git checkout @ -- myfile.ext
Show git diff for a single file:
git diff @ myfile.ext
Backup settings:
- Navigate to your
Preferencesfolder, usually found in/Users/<user>/Library/Preferences - Run the following command
tar -zcvf phpstorm_settings.tar.gz PhpStorm2017.3/(Filename can be whatever, including a custom path. The folder name will be the folder covering your version of phpstorm)
Restore settings:
- Delete current folder in preferences
- Run the following command
tar -zxvf phpstorm_settings.tar.gz(will extract to the current folder)