User Tools

Site Tools


git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
git [2014/09/02 18:04] – [Update a submodules repo] admingit [2021/01/19 23:58] (current) – [Git Changelog] admin
Line 35: Line 35:
 ==== Master-Branch hoch schieben ==== ==== Master-Branch hoch schieben ====
  
-Schiebt die lokale Repo (origin) auf die online Repository (master)+Schiebt die lokale Repoauf die online Repository (origin) in den Branch (master)
  
   git push origin master   git push origin master
Line 54: Line 54:
 Example: Example:
  
 +  cd /YOUR/CLONED/REPO
   git submodule add https://redmine.knallimall.org/git/imagemap/ dokuwiki_imagemap   git submodule add https://redmine.knallimall.org/git/imagemap/ dokuwiki_imagemap
   git add .   git add .
Line 77: Line 78:
   git commit -am "Upgrade submodules ..."   git commit -am "Upgrade submodules ..."
   git push origin   git push origin
 +
 +===== Pull =====
 +
 +  git pull origin
 +  git submodule update
 +
 +====== Change git Author ======
 +
 +<code bash git.sh>
 +#!/bin/sh
 +
 +git filter-branch -f --env-filter '
 +
 +OLD_EMAIL="OLD@E_MAIL"
 +CORRECT_NAME="ochorocho"
 +CORRECT_EMAIL="rothjochen@gmail.com"
 +
 +if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
 +then
 +    export GIT_COMMITTER_NAME="$CORRECT_NAME"
 +    export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
 +fi
 +if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
 +then
 +    export GIT_AUTHOR_NAME="$CORRECT_NAME"
 +    export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
 +fi
 +' --tag-name-filter cat -- --branches --tags
 +</code>
 +
 +====== Git Changelog ======
 +
 +Generate a simple changelog of all commits between latest 2 tags.
 +
 +<code bash>
 +#!/usr/bin/env sh
 +
 +TAGS=($(git tag --sort=-version:refname | head -n 2))
 +git log --pretty=format:"* %s" "${TAGS[0]}"..."${TAGS[1]}" > RELEASE_CHANGELOG.md
 +</code>
 +
 +
git.1409673883.txt.gz · Last modified: 2014/09/02 18:04 by admin