git

Purge history for a pushed confidential data in remote origin?

谁都会走 提交于 2021-02-18 22:30:48
问题 A while ago, we've pushed some app.settings files containing sensitive data such as connection strings. That was long time ago and since then we've removed (by pushing new versions) which don't contains the sensitive data. However , If someone will try to see app.settings 's history - he will see the connection strings. Question How can I make the passwords not to be there even with history lookup. Also- I don't want to see that connection strings has been removed compared the one commit

Difference between -C and --git-dir when manipulating repo in git hook

瘦欲@ 提交于 2021-02-18 22:11:49
问题 I am writing a git post-receive hook that will clone a separate repo as part of a deployment. It clones the repo to a certain folder and uses the -C option in subsequent git commands to set the directory to that of the checked out repo (as documented in the man page). The hook works as expected when run manually from the command line, however when the hook is run by git (ie when a push is received) the command fails with fatal: Not a git repository: '.' . When I swap out the -C for a --git

Difference between -C and --git-dir when manipulating repo in git hook

随声附和 提交于 2021-02-18 22:11:06
问题 I am writing a git post-receive hook that will clone a separate repo as part of a deployment. It clones the repo to a certain folder and uses the -C option in subsequent git commands to set the directory to that of the checked out repo (as documented in the man page). The hook works as expected when run manually from the command line, however when the hook is run by git (ie when a push is received) the command fails with fatal: Not a git repository: '.' . When I swap out the -C for a --git

Git add . Gives me Bus error (core dumped)

我们两清 提交于 2021-02-18 22:10:17
问题 I am using ubuntu and trying to put my code on github but when I tried using the "git add ." command , I got an error "Bus error (core dumped)". joannah@joannah-Inspiron-N5040:~/Macerdo$ git init Initialized empty Git repository in /home/joannah/Macerdo/.git/ joannah@joannah-Inspiron-N5040:~/Macerdo$ git add . Bus error (core dumped) joannah@joannah-Inspiron-N5040:~/Macerdo$ I will appreciate any help. 回答1: For future reference .I solved this by creating a new folder and putting all my

GitLab CI/CD: Run jobs only when files in a specific directory have changed

点点圈 提交于 2021-02-18 22:09:45
问题 I would like to run specific jobs on the .gitlab-ci.yaml if and only if files within specific directories of the repository have changed. Is there a way to do this with gilab's ci/cd tooling or would it be easier just to run a custom build script? 回答1: Changes policy introduced in GitLab 11.4. For example: docker build: script: docker build -t my-image:$CI_COMMIT_REF_SLUG . only: changes: - Dockerfile - docker/scripts/* - dockerfiles/**/* - more_scripts/*.{rb,py,sh} In the scenario above, if

GitLab CI/CD: Run jobs only when files in a specific directory have changed

浪尽此生 提交于 2021-02-18 22:09:14
问题 I would like to run specific jobs on the .gitlab-ci.yaml if and only if files within specific directories of the repository have changed. Is there a way to do this with gilab's ci/cd tooling or would it be easier just to run a custom build script? 回答1: Changes policy introduced in GitLab 11.4. For example: docker build: script: docker build -t my-image:$CI_COMMIT_REF_SLUG . only: changes: - Dockerfile - docker/scripts/* - dockerfiles/**/* - more_scripts/*.{rb,py,sh} In the scenario above, if

Git add . Gives me Bus error (core dumped)

走远了吗. 提交于 2021-02-18 22:08:42
问题 I am using ubuntu and trying to put my code on github but when I tried using the "git add ." command , I got an error "Bus error (core dumped)". joannah@joannah-Inspiron-N5040:~/Macerdo$ git init Initialized empty Git repository in /home/joannah/Macerdo/.git/ joannah@joannah-Inspiron-N5040:~/Macerdo$ git add . Bus error (core dumped) joannah@joannah-Inspiron-N5040:~/Macerdo$ I will appreciate any help. 回答1: For future reference .I solved this by creating a new folder and putting all my

GitLab CI/CD: Run jobs only when files in a specific directory have changed

怎甘沉沦 提交于 2021-02-18 22:08:39
问题 I would like to run specific jobs on the .gitlab-ci.yaml if and only if files within specific directories of the repository have changed. Is there a way to do this with gilab's ci/cd tooling or would it be easier just to run a custom build script? 回答1: Changes policy introduced in GitLab 11.4. For example: docker build: script: docker build -t my-image:$CI_COMMIT_REF_SLUG . only: changes: - Dockerfile - docker/scripts/* - dockerfiles/**/* - more_scripts/*.{rb,py,sh} In the scenario above, if

Git add . Gives me Bus error (core dumped)

China☆狼群 提交于 2021-02-18 22:08:37
问题 I am using ubuntu and trying to put my code on github but when I tried using the "git add ." command , I got an error "Bus error (core dumped)". joannah@joannah-Inspiron-N5040:~/Macerdo$ git init Initialized empty Git repository in /home/joannah/Macerdo/.git/ joannah@joannah-Inspiron-N5040:~/Macerdo$ git add . Bus error (core dumped) joannah@joannah-Inspiron-N5040:~/Macerdo$ I will appreciate any help. 回答1: For future reference .I solved this by creating a new folder and putting all my

How do I edit past git commits to remove my password from the commit logs?

泪湿孤枕 提交于 2021-02-18 22:05:15
问题 My problem: cygwin git doesn't seem to correctly prompt for credentials when using https:// URLs, so I used username and password in the URL. Unfortunately when I did a "get pull" it auto-commited a message with the full URL including password. I didn't notice this until after I had pushed the changes. How do I edit old commit messages to eradicate the password in the URL? My shared git repo is on my own server. I can do surgery on the repo if necessary. Instructions on how to change my