Skip to content

Instantly share code, notes, and snippets.

As far as I can tell, you can't do it conveniently. That is, git-rebase does not give you an option to preserve the committer date. Unless you give the --ignore-date (or its alias, --reset-author-date) option, it will always preserve the author date. However, there is no way to make git-rebase preserve the committer date, unless some manual script is crafted.

The best you can do is to make the committer date equal to the author date. Recently (in 2020 Q4), git-rebase --interactive has gained the ability to use the --committer-date-is-author-date flag with the interactive rebase. Before that, there was no way of influencing the committer date at all with the interactive rebase. Note that this flag does not preserve the committer date. It merely makes the committer date equal to the author date.

You might be thinking "well, isn't that effectively preserving the committer date, since normally the committer date is always equal to the author date?". Normally, you would be correct. However, there

@ayubmetah
ayubmetah / digits_of_number.py
Created December 20, 2020 04:53
Complete the function digits(n) that returns how many digits the number has. For example: 25 has 2 digits and 144 has 3 digits. Tip: you can figure out the digits of a number by dividing it by 10 once per digit until there are no digits left.
def digits(n):
count = 0
if n == 0:
return 1
while (n > 0):
count += 1
n = n // 10
return count
print(digits(25)) # Should print 2
@y56
y56 / ERROR launchpadlib 1.10.6 requires testresources which is not installed
Created April 11, 2020 19:26
ERROR: launchpadlib 1.10.6 requires testresources, which is not installed.
https://www.discoverbits.in/864/error-launchpadlib-requires-testresources-which-installed
==
ERROR: launchpadlib 1.10.6 requires testresources, which is not installed.
+2 votes
asked Oct 6, 2019 in Programming Languages by pythonuser (11.5k points)
recategorized Oct 6, 2019 by pythonuser
I am getting the following error when I try to upgrade setuptools:
@leimao
leimao / ClearInputBuff.cpp
Created December 30, 2019 07:44 — forked from manadream/ClearInputBuff.cpp
Clearing input buffer in C++ completely
#include <iostream>
#include <limits>
using namespace std;
int main(){
char var[10];
bool valid = false;
while(!valid){
cout << "Enter a string 9 characters long: ";
@outloudvi
outloudvi / preserve-vsc-customization.hook
Created December 16, 2019 09:59
Preserve writable permission for CSS of VSC workbench for background modifications (like https://github.com/shalldie/vscode-background). For Arch Linux (and maybe Manjaro?). This should be put in /etc/pacman.d/hooks .
[Trigger]
Type = Package
Operation = Install
Operation = Upgrade
Target = code
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
@bhandarisaurav
bhandarisaurav / Online KMS Activator.cmd
Last active June 24, 2024 14:17
Activate Windows & Office for 180 Days with online KMS Servers. This script does not install any files in your system and it clears all the leftovers including kms server name after the Activation. For Successful Activation, Internet Must be connected.
@echo off
::::::::::::::::::::::::::::
set "params=Problem_with_elevating_UAC_for_Administrator_Privileges"&if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
fsutil dirty query %systemdrive% >nul 2>&1 && goto :GotPrivileges
:: The following test is to avoid infinite looping if elevating UAC for Administrator Privileges failed
If "%1"=="%params%" (echo Elevating UAC for Administrator Privileges failed&echo Right click on the script and select 'Run as administrator'&echo Press any key to exit...&pause>nul 2>&1&exit)
cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "%~0", "%params%", "", "runas", 1 > "%temp%\getadmin.vbs"&cscript //nologo "%temp%\getadmin.vbs"&exit
:GotPrivileges
::::::::::::::::::::::::::::
color 1F
@AlvaroBrey
AlvaroBrey / authorize_adb.sh
Last active March 1, 2019 19:21
Authorize ADB for a non-booting device
#!/usr/bin/env bash
adb shell 'echo "persist.service.adb.enable=1" >> default.prop'
adb shell 'echo "persist.service.debuggable=1" >> default.prop'
adb shell 'echo "persist.sys.usb.config=mtp,adb" >> default.prop'
adb shell 'echo "persist.service.adb.enable=1" >> /system/build.prop'
adb shell 'echo "persist.service.debuggable=1" >> /system/build.prop'
adb shell 'echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop'
adb push ~/.android/adbkey.pub /data/misc/adb/adb_keys
@h3xstream
h3xstream / advancedsettings.xml
Last active July 11, 2020 13:58
Kodi/XMBC configuration
<advancedsettings>
<!-- http://kodi.wiki/view/Advancedsettings.xml -->
<!-- Display information overlay for the complete duration of the play in visualisation mode -->
<songinfoduration>999999999999999</songinfoduration>
<advancedsettings>
From 298c82e03c102b484cb46d6ca9328a78c60816ec Mon Sep 17 00:00:00 2001
From: Park Ju Hyung <qkrwngud825@gmail.com>
Date: Tue, 15 Nov 2016 16:59:43 +0900
Subject: [PATCH] jni: consider /data/app to the fd whitelist if Xposed is
detected
Latest security update has added whitelisting routine to the Zygote.
Since Xposed now reads from /data/app,
it's necessary to add /data/app to the whitelist.
@bmaupin
bmaupin / install-openjdk-6-ubuntu-16.sh
Last active December 22, 2023 12:11
Install openjdk-6-jdk on Ubuntu/Xubuntu 16.04
# NOTE: This is a hack and will downgrade the tzdata package.
# Better alternatives:
# - Use Azul Zulu build of OpenJDK 6 (https://www.azul.com/downloads/zulu/zulu-linux/ - make sure you enable the box labeled Older Zulu versions)
# - Install Java 6 directly from Oracle and install it manually (https://gist.github.com/bmaupin/16855ce1b2484c459f41ad836a7d3f2f)
wget http://launchpadlibrarian.net/235298493/openjdk-6-jdk_6b38-1.13.10-1_amd64.deb
wget http://launchpadlibrarian.net/235298496/openjdk-6-jre_6b38-1.13.10-1_amd64.deb
wget http://launchpadlibrarian.net/235298494/openjdk-6-jre-headless_6b38-1.13.10-1_amd64.deb
wget http://launchpadlibrarian.net/235298487/openjdk-6-jre-lib_6b38-1.13.10-1_all.deb
wget http://launchpadlibrarian.net/250277191/tzdata_2016c-0ubuntu1_all.deb