A VS Code extension that generates timesheet entries from your Git commits.
Features
Extracts your Git commits for a specific day
Formats them in a timesheet-friendly format
Copies the result to your clipboard
Saves you from the torment of remembering what you did yesterday
Usage
Open your Git repository in VS Code
Press Ctrl+Shift+P (or Cmd+Shift+P on macOS) to open the Command Palette
Type "Generate Timesheet" and select the command
Enter the date offset (0 for today, -1 for yesterday, etc.)
Wait for the magic to happen
Paste the generated timesheet into your time tracking system
Force Fetch Option
You can now use a separate command to force fetch all remote branches (ignoring the branch cache):
Generate Timesheet from Commits (Force Fetch)
This command is available in the Command Palette and will always use the -f flag. Use this if you want to refresh your branch data before generating the timesheet.
Requirements
Git must be installed and available in your PATH
Your repository should have some commits (shocking, I know)
To build and package the extension, you need Node.js and npm installed. You also need vsce installed globally (npm install -g vsce).
Building and Installing Locally
If you want to build and install the extension from source:
Clone the repository.
Navigate to the project directory in your terminal.
Install dependencies: npm install
Compile the project: npm run compile (If you encounter a TypeScript error about suite or test, run npm install --save-dev @types/mocha and try compiling again).
Package the extension: vsce package (This will create a .vsix file in the project directory).
Open VS Code.
Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
Search for and select "Extensions: Install from VSIX...".
Navigate to the project directory and select the generated .vsix file (timesheet-generator-X.Y.Z.vsix, where X.Y.Z is the version).
Reload VS Code if prompted.
Extension Settings
This extension contributes the following settings:
timesheet-generator.defaultAuthor: Default author name to use if not specified
Known Issues
May expose the truth about how little work you actually did
The formatting is optimized for copy-paste, not for visual appeal