#!/bin/bash
git add .
git status
updatedFiles=$(git status | awk '{print $2}' | grep -P "\..*$")
touch updates/update.txt
git status > updates/update.txt
for file in $updatedFiles
do
cp --parents "$file" ./updates
echo "copied $file to ./updates/$file"
done;
read -p "Press enter to exit"
mkdir updates
and then run the bash script above. Files will be copied into updates directory, and we can manage it by date.
Thursday, August 20, 2020
Copy all lastly updated files into a single directory if the version control is horribly not done by git:
Instantiate a git repository (don't need to connect to any remote branch, do everything locally).
Create a .sh file at the current directory, and paste:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment