git-commit

Go back N commits in Git to find commit that causes test regressions

自古美人都是妖i 提交于 2019-12-04 00:24:40
Is there a command that will let me checkout a commit based on its distance from the current commit instead of using commit IDs? Use Case Basically I am thinking of setting up a cron job type script to do the following on a build server: Pull down the latest of a specific git branch (git pull dev). Build it, run the tests. If the pass percentage is lower than the last stored percentage: Recursively go back a commit, build, run tests, until it finds the commit where the percentage changed. Log the commits that introduced regressions. I have a rough idea for how this would hinge together but it

What does “*.jpg binary -delta” do in the .gitattributes file?

好久不见. 提交于 2019-12-03 20:47:28
This thread is suggesting placing *.jpg binary -delta in the .gitattribute file for repos in git but I am not sure what it does. I cannot find any examples of the '-delta' flag for git. The purpose is to apparently speed up commit or push times for larger files. VonC That could be related to: Packing objects delta Delta compression will not be attempted for blobs for paths with the attribute delta set to false. I detail delta storage in " Is the git binary diff algorithm (delta storage) standardized? ". That isn't set by default of binary files because: our originally intended target audience

What happens to orphaned commits?

微笑、不失礼 提交于 2019-12-03 16:36:46
问题 I have a repo with four commits: $ git log --oneline --decorate 6c35831 (HEAD, master) C4 974073b C3 e27b22c C2 9f2d694 C1 I reset -- soft to the C2 commit and now I have a repo like so: $ git reset e27b22c --soft $ git log --oneline --decorate e27b22c (HEAD, master) C2 9f2d694 C1 Now I add an extra commit, so the log looks like this: $ git log --oneline --decorate 545fa99 (HEAD, master) C5 e27b22c C2 9f2d694 C1 What happened to commits C3 and C4 ? I haven't deleted them, so I assume they are

Getting TravisCI to commit and push a modified file with Tags (releases)

孤街醉人 提交于 2019-12-03 16:20:09
I was helped by Sir Athos (thank you greatly) earlier today on a separate question which helped me greatly. I am now stuck at a point where I want to modify a simple text file and include it in my push. So basically I want to add the modified text file to a commit and push it as a commit with it's build number tag as a release. Hope I am making sense here. My code to do try and do this so far is #!/bin/bash YEAR=$(date +"%Y") MONTH=$(date +"%m") git config --global user.email "${GIT_EMAIL}" git config --global user.name "${GIT_NAME}" git config --global push.default simple export GIT_TAG=v2.

Share publically a part of a private repo on Github

两盒软妹~` 提交于 2019-12-03 14:34:36
I'm wondering what's the best way to publically share on Github a file that's on a private repo on Github. I would like thet every time a make a push in my private repository automatically the file is updated too. In particular I have a .tex project: I would like to keep secret the tex files but I would like to make available to everyone the pdf file. Note I'm aware of the existence of the gitignore option, but I don't want to use it since I want to keep track of the improvements on the tex files I would like to keep secret the tex files but I would like to make available to everyone the pdf

How do I place a dummy file in a git repo?

强颜欢笑 提交于 2019-12-03 13:30:49
I'm new at git so please bear with me. Say i have a file under version control that includes sensitive data. Sure enough, I put that file in my .gitignore file, so it doesn't get pushed to the repo. The problem now is somewhere in my project i have a line like #include <sensitivedata> or whatever your language of choice is. The problem is whenever somebody clones from that repo, that file is missing and he gets a fatal error when trying to build / compile the solution. So, instead of pushing the file I'm actually working on I want to push some dummy file with the same name instead, where I

fatal: No existing author found with 'XXX'

你说的曾经没有我的故事 提交于 2019-12-03 08:58:19
问题 I used git for the first time and I set my user name and user mail. The commands I used are below: git config --global user.email "bob@example.com" git config user.email "bob@example.com" git config --global user.name "bob" git config user.name "bob" When I run git commit --author "bob" , I got an error fatal: No existing author found with 'bob' . How can I set user name and email? 回答1: You should stop using --author each time you commit, and instead configure an author with git config . Once

What to do after cloning repo from git

本秂侑毒 提交于 2019-12-03 07:20:36
I am just a git starter , basically I clone a git repository and now I wanted to commit the changes that I made in a file. when I run the command git commit it says not a git repository , So being a starter in git i just wanted to ask that do i need to run this command first - git init and then git commit ? Or in between these some more steps to follow to commit the file? I need to commit files on Bitbucket. Screenshot- David Culp As jeremyharris said, the git documentation site and especially the online book there will get you up to speed on the basics. A few quick notes that might get you

How to create a new Patchset in Gerrit?

五迷三道 提交于 2019-12-03 07:20:28
问题 I am new to Gerrit and want to create a new Patch when new changes are submitted. I setup Gerrit with this guide https://review.typo3.org/Documentation/install-quick.html Then I try to create a new patch with http://gerrit.googlecode.com/svn/documentation/2.0/user-changeid.html and also added Change-Id line at bottom of the Commit-message. But I am getting new Change instead of new Patchset. Can anyone help me? Thanks 回答1: Step 1 : Install commit-msg hooks for gerrit scp -p -P 29418 localhost

What happens to orphaned commits?

﹥>﹥吖頭↗ 提交于 2019-12-03 05:54:13
I have a repo with four commits: $ git log --oneline --decorate 6c35831 (HEAD, master) C4 974073b C3 e27b22c C2 9f2d694 C1 I reset -- soft to the C2 commit and now I have a repo like so: $ git reset e27b22c --soft $ git log --oneline --decorate e27b22c (HEAD, master) C2 9f2d694 C1 Now I add an extra commit, so the log looks like this: $ git log --oneline --decorate 545fa99 (HEAD, master) C5 e27b22c C2 9f2d694 C1 What happened to commits C3 and C4 ? I haven't deleted them, so I assume they are still there, C3 's parent is still C2 . Short answer: Commits C3 and C4 will remain in the Git object