Tag: git commit

How do I commit live code using GIT?

Our repo folder/tree contains the following folder/files inside: db/ -> this is where we store our db.sql src/ -> this is where we store our Drupal Site Files settings_.cmd -> file that contains DB username and passwords etc setup.cmd -> file that deploys the DB to localhost. Ok so when I deploy the drupal site […]

All my commits have the same time

As I just pushed my commits to GitHub, the website told my that the last update was 5 hours ago. I figured out the problem was local and that my commits were wrongly timestamped. In the printscreen below, you can see that the dates and times on the right are exactly the same (I know […]

Get only the content of each commit in a json ? ( git diff json)

So I’m storring on my github all the differences I get on a json file during time ( I call an api that updates each time the json and only store the differences). To give you an idea ; It’s the changes of availability, either an id is available or not. What I’m trying to […]

Git commit that doesn't override original authors in git blame

I’ve used a perl script to modify all tab characters in a php git repository and changed them all to 4 spaces. $ find -iname \*.php -exec perl -pi -e “s/\t/ /g” {} \ I can commit this change with git commit, but it will mark me as the author of all changed lines inside […]

Git Commit message pretty format: Is there a way to format multi-line body

I am trying to format my git log output with pretty formats. So far so good, but when using the 50/72 pattern, the wrapped body breaks the format (ss for reference). Is there a way to keep the format of the first body line on the subsequent lines? Pretty format I am using ATM: git […]

Git one-liner to add everything (including untracked files) and commit

This question already has an answer here: Is it possible to skip the staging area and (also) commit untracked, new files to git? 3 answers

Jenkins Invalid Git Revisions

In Jenkins I’m using the XML API to get the SHA(s) of a commit, e.g. http://jenkins/view/job/test/470/api/xml?xpath=//lastBuiltRevision/SHA1&wrapper=SHAS I put it in a wrapper because often it contains more than one SHA and I’m going to process these further. However one of the SHAs always is invalid… <SHAS> <SHA1>cbf26ebac6b4b3860a794c0b1ad86758e7757a3a</SHA1> <SHA1>7e861132ce428911585a818107ba35c44cf12bbf</SHA1> </SHAS> The second SHA is fine but […]

Easy way to add -A/commit main/all submodules

By using git add -A and git commit -a, I can obviously add/commit all changes to the repo I’m currently situated in. However, is there a way to include all submodules in an add/commit and apply the same commit message to each?

Undo a git commit + git branch <branchname> — with a twist

I am in the process of “documenting in hind-sight” the history of an application development, by moving existing snapshots of the project’s directory tree (that were saved back then by plain & primitive folder copies, not git or any other version control) to git. After struggling with learning git’s new concepts and new terminology, this […]

How to move certain commit to NEW branch

I have commit X and 2 commits after it. I should move only X to new branch. How can I do this? (And my repo is in remote repo also, I don’t think exactly what is it, but I won’t get “detached head”) Thanks a lot

Git Baby is a git and github fan, let's start git clone.