Comments (9)
Did you run gtm init
from within the root directory of an already initialized git repo? Here's how you can test if it's working correctly.
- git init
- gtm init
- edit some files in your editor
- gtm status
- git add/commit
- gtm report
from gtm.
Yes it was in a an already initialized repo.
git init
returns the error I mentionned previously and the other gtm
commands returns Git Time Metric is not initialized
, is it not possible to use it in an already initialized repo ?
from gtm.
GTM does not work with bare git repos, i.e. git init --bare
. I'm guessing that is what the issue is. You can check this by looking for the .git
hidden directory in the root. If it doesn't exist it's been initialized as a bare repo.
from gtm.
There is a .git
in both all the repo I have tested this. Any other thoughts ?
from gtm.
Let's determine if it's an issue with just this repo or in general for all repos. Can you try creating a new git repo and initialize gtm? If would be helpful if you could also share the .git/config file for the repo that has been problematic.
from gtm.
I tried with a newly initialized repo and it worked but it does not seem to work on existing repo (it is a shared repo by the way).
And here I shared with you the .gitconfig of the problematic repo (I had to hide some of the facts as it s not my personal repo), the file is truncated but the rest of the file only contains remote branches config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = ************
fetch = +refs/heads/*:refs/remotes/origin/*
from gtm.
I don't see anything out of the ordinary for the git configuration.
To make sure I understand the issue, do you get the "No files need merging" when running gtm init
or after initializing the repo and then trying to add/commit files?
You should see something similar to this when running gtm init
Git Time Metric initialized for /Users/mschenk/Projects/platform-chef
post-commit: gtm commit --yes
alias.fetchgtm: fetch origin refs/notes/gtm-data:refs/notes/gtm-data
alias.pushgtm: push origin refs/notes/gtm-data
notes.rewriteref: refs/notes/gtm-data
terminal: true
.gitignore: /.gtm/
tags:
I have a few things for you to check.
-
Try running
gtm status
after editing some files in your editor with the gtm plugin. If it's recording properly you should see some time reported. -
Check to see if the
.git/hooks/post-commit
contains gtm. If you can, please share the contents of this file. This hook is what records the time in a git note associated with the commit. If this is not firing properly you will not see time when runninggtm report
.
Note - there is bug I addressed in the last release (just the other day) that sets the full path for gtm in the post-commit hook. You can see more here #54.
from gtm.
Ok I really don't know why, but it seems like it is working now...
Possible answer would be me from node v5 to node v6.9.0, but I am not really anyway I retried gtm init
on an existing repo and it worked fine!
from gtm.
Good to hear. 👍
from gtm.
Related Issues (20)
- Get name of branch while report with summary format HOT 1
- Release for RPi; build info
- After an interactive rebase with squashing and commit reordering, we lose the time tracking data HOT 5
- `gtm commit` deletes pending time when a note for last commit already exists HOT 1
- Dashboard app for gtm HOT 1
- Panic in event.pathFromSource when doing record on quoted path ending with backslash
- Extracting time metrics from an existing repository ? HOT 4
- Startup Abort in Pycharm 2019.3 HOT 2
- GTM Listing Seconds as Minutes
- Nullpointer in IntelliJ
- FreeBSD 13.0-RELEASE compatibility HOT 2
- "gtm report -this-year" is listing times of a different git project
- GTM homebrew package does not support apple silicon HOT 2
- GTM killed: 9 on macos Ventura 13.0 HOT 3
- gtm appears to not work in a Cygwin environment
- Executing "gtm report" remain pending HOT 2
- Jira Smart Commits support HOT 11
- Support for tracking apps HOT 4
- [bug] `gtm status` does not respect `-terminal-off` HOT 3
- Squash merge and gtm? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gtm.