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 627765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:33:49+00:00 2026-05-13T19:33:49+00:00

I would like a specific string in a specific file to be hidden every

  • 0

I would like a specific string in a specific file to be hidden every time I commit changes to that file.

Actually, I have a URL in a file that shouldn’t be public in a remote repository. Is there anyway to hide it using pre-commit and post-commit hooks or something similar?

Currently I am working with a git repository but it would be nice to know how to do this with svn.

Thanks,
Simão

  • 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-05-13T19:33:50+00:00Added an answer on May 13, 2026 at 7:33 pm

    If you really must have that file under version control, use a git attribute filter driver (see also GitPro book).

    A filter driver consists of a clean command and a smudge command, either of which can be left unspecified.
    Upon checkout, when the smudge command is specified, the command is fed the blob object from its standard input, and its standard output is used to update the worktree file.
    Similarly, the clean command is used to convert the contents of worktree file upon check-in.

    That way, the script (a private version, only in your repo, not managed by Git) referenced by the smudge can replace the coded URL, while the clean script will restore its content to a coded URL.
    A public version of the same script, managed by git and pushed everywhere would do… nothing and keep the URL obfuscated.

    alt text

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

Sidebar

Related Questions

I have a string in C# and would like to get text from specific
I would like to find the files containing specific string under linux. I tried
Hey I have an XML file and I would like to navigate to a
How do I write to a txt file, so I would like a string
I have a file in Linux, I would like to display lines which contain
How would you remove a specific string from a text file (command line) e.g.
I would like to embed user-specific data on-the-fly when distributing an APK from my
I would like to take a specific part of the last line of a
I would like a node of a specific type to always appear at the
I would like to implement a simple queueing service specific to a project. Where

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.