Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9232545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:20:23+00:00 2026-06-18T06:20:23+00:00

Possible Duplicate: Enable ident string for Git repos In my project, every source file

  • 0

Possible Duplicate:
Enable ident string for Git repos

In my project, every source file (regardless of the language – Java, Python, shell) has a comment line that contains source control information – branch, date of last commit, committer name, etc.

This is done by using special placeholders (e.g. $Branch$) which are auto-replaced by the source control application.

Is it possible to achieve similar functionality in git?

I am using Git Extensions on Windows and yet-to-be-decided GUI on Linux, but I assume both are just GUIs that invoke the git command-line tools.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T06:20:24+00:00Added an answer on June 18, 2026 at 6:20 am

    You have to read about smudge/clean filters in Git in order to get some iteration of keyword-replacement.

    Grok section “Keyword Expansion”, where example of expanding $DATE$ keyword explained (and a must reverse-operation). In you case most work of expanding $SOMEKEYWORD$ to version string can be performed by git describe under the hood, clean part must be implemented by hand (your hand)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: compiling project with jdk1.5 using maven2 I am trying to build java
Possible Duplicate: How to enable file sharing for my app? How can i enable
Possible Duplicate: maven: (use -source 5 or higher to enable static import declarations) What
Possible Duplicate: Java VisualVM Enable Heap Dump on OOME I've got an App that
Possible Duplicate: How can I disable/enable UISearchBar keyboard's Search button? Can we disable the
Possible Duplicate: How to use enable_if to enable member functions based on template parameter
Possible Duplicate: How to enable or disable an anchor using jQuery? I've got an
Possible Duplicate: Ways to circumvent the same-origin policy Is it possible to enable cross-domain
Possible Duplicate: Unicode in C++ If I remembered correctly, the default character and string
Possible Duplicate: Enable ‘xp_cmdshell’ SQL Server When I run xp_cmdshell command in SQL Server

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.