Difference between file created in github and one pushed to github?

I created a file in repo X using the github GUI (i.e. the little plus sign next to the repo’s name), resulting in a commit line in the history for X/filename that says “Create filename”. Then I deleted the file and wrote a new one from gitbash (in Windows) using echo "file contents" > filename, which I added, committed, and pushed. There is now another line in history that looks identical to the original “Create filename” line.

Is there a difference between the underlying functionality of these two commit methods and if so, is there any way to detect that by reading the history?

  • GitHub - why two lines are marked as different without any visible differences?
  • IntelliJ Diff Tool in SourceTree
  • is there a simple way to know which files will be updated in the next 'git pull'?
  • Reading git diff output
  • How to get diff between all files inside 2 folders that are on the web?
  • How do I create a diff file with visual source safe?
  • .ssh config with amazon ec2 and git
  • What is the standard or best way to deal with database branching with Mercurial or Git branches?
  • How do I push to the current git branch on remote, and have changes reflected immediately?
  • How to ignore some branches/tags being copied to local git when do git fetch --all
  • How does a decentralised version control system improve workflow?
  • How do you use tags in git to manage software versions
  • 2 Solutions collect form web for “Difference between file created in github and one pushed to github?”

    Not really

    You can look at the raw commit on github by appending .patch to a commit url; doing so you’ll likely draw the conclusion “no” it’s not possible to identify commits done via github’s web-editor.

    But it’s possible in specific circumstances

    By inspection you may find that there are some indicators that permit identifying the source.

    For example, compare this commit:

    From 6b766cd443de8d0694438cab9455517f851d817a Mon Sep 17 00:00:00 2001
    From: AD7six <andydawson76@gmail.com>
    Date: Wed, 26 Mar 2014 16:57:58 +0000
    Subject: [PATCH] Make the pages controller throw 404s

    with this commit:

    From 234407bbaa41333f077243bef32c2317692f440d Mon Sep 17 00:00:00 2001
    From: Andy Dawson <andydawson76@gmail.com>
    Date: Sat, 31 May 2014 18:42:22 +0200
    Subject: [PATCH] add more descriptive env/dsn docs

    There is a subtle but clear indicator (to me) which commits were made via github’s web interface:

    From: AD7six <andydawson76@gmail.com>
          ^ normal commit
    From: Andy Dawson <andydawson76@gmail.com>
          ^ Github UI

    The first comes from my own git config user.name setting, wheras the second is my name as shown on github.

    This is one example scenario whereby it becomes possible to identify a commit made via Github’s UI rather than as a normal git commit.

    The github UI and command line manipulate the git repository in the same way. There is no such concept as “came from remote” vs “local”, as the entire history of a branch is synced/merged on a push. The only way to track differences is by appropriate commit comments.

    github could use git notes or templating on commit messages to differentiate the UI commits, but as far as i know there is no such option at this time.

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