Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

RECIRCLE / portal

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 11
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Git tips and tricks

Git tips and tricks

Last edited by Belákovics Ádám Apr 10, 2019
Page history

Problem: Git asks for credentials at every operation.

There are two solutions:

  1. Configure an access ssh key (bit difficult and depends on the remote server)
  2. Configure git credential cache (simple)

Modify your local git config with the following command:

git config credential.helper 'cache --timeout=21600'

This will tell git to remember your credentials for 6 hours.

Problem: Store executable file in a git repo.

With the following script git will remember, that the file has to be handled as executable, after a pull the file will have the required permissions.

 # Stage the script.sh file
 git add script.sh 
 # Flag it as executable
 git update-index --chmod=+x script.sh
 # Commit the change
 git commit -m "Make script.sh executable."
 # Push the commit
 git push
  Clone repository
  • Developer guideline git
  • How to setup the development environment?
  • Git tips and tricks
  • Home
  • Installing requirements
  • New models
More Pages
×

New Wiki Page

Tip: You can specify the full path for the new file. We will automatically create any missing directories.