Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

git clone --mirror

Posted on Thursday, September 11, 2014


I just finished reading the book a pragmatic guide to git.



In this book git clone --mirror command.   After looking it up at http://git-scm.com/docs/git-clone [1]


This is a way to clone a repository in such a way that it can be used as a remote repository.

I am still a novice to git. If I am getting part of this wrong, please call me out.



Getting a format-patch history in git

Posted on Thursday, September 4, 2014




Today I had a higher up want to have a record of my recent work.  They did not intend to do anything with it they just wanted a history.  I sent them a spreadsheet with tickets I had been working and a patch file from git .



I have never used patch files myself, so forgive my ignorance if I say something incorrect.


Fixing user.name in history

Posted on Monday, September 1, 2014



I messed up a personal repository.  I have my business email on all my commits!  I know now better after doing a write up on git config files and their scope at http://www.whiteboardcoder.com/2014/08/the-three-git-config-files.html .  After writing that, I now know to set my personal user.name and user.email on my personal repositories in the "Repository Specific" git config file.

But that information does not help me fix my errors in my prior commits.

From one of my personal repositories, if I run


    >  git log -n 3


The Three git config Files

Posted on Sunday, August 31, 2014




This article will cover the three different git config files and their scope.

I have been using git for a few years now, but not studying it in depth … until now.

Here is my current git issue I am working through.    I have some repositories from my job I am working from.  I set up my user.name and user.email in my ~/.gitconfig file (the global scope).   Which is fine and dandy, and working well.  But now I have some personal repositories that are re-using the same user.email and user.name from the global scope.   I want them to use a different name and email, but only in these repositories.

Atlassian has a good post on the gitconfig file scope at https://www.atlassian.com/git/tutorial/git-basics#!config [1]


git and rsync folders tools round 2

Posted on Thursday, August 28, 2014

















This article is round 2 from a recent article I wrote at http://www.whiteboardcoder.com/2014/08/git-and-rsync-folders.html .

I am dealing with another folder that does not have a nice structure.  In this case I may have folders three levels deep and folders one level deep I want to rsync and not store in the .git repo.   Also, aside from the structure and shell scripts, I do not want to store anything in git,, except the folder structure up to the rsync script.   I like my round 2 solution better than my previous ones.  I think I will roll it out to my other folders where I have rsync needs.

git and rsync folders

Posted on Tuesday, August 26, 2014



But, this article will be a little more focused and quick to the point.

I have a folder which has seven subfolders.  I do not want to track any file with git, but I do want to have easy access to rsync each folder to other computers.

Each individual folder will have its own rsync script that can retrieve its contents remotely.   I will use git to make a repository that only contains scripts and the seven folders.



git filemode and fat32

Posted on Sunday, August 24, 2014


Recently I have been on a journey setting up backup systems for my personal files and notes.  This system is using git and a few scripts that utilized rsync to get the job done.

At work, on my work laptop, I decided to keep my personal git repository on a small SanDisk Cruzer Fit USB Drive.  That way when/if I leave this job or get my laptop replaced its easy to take "My" files with me.

Looking at the file permissions on the thumb drive


     > ls -alh




Using find, sed, and xargs to replace filename in document

Posted on Wednesday, August 20, 2014


I have been setting up a system using git and rsync.  For larger files, or folders that don't change often, I am using rsync in place of git.  git was never meant to move large binary files as I found out.   My sojurn into this is documented at http://www.whiteboardcoder.com/2014/08/gitignore-and-calculating-tools.html

I am at a point, now, where I am engineering a solution for all my ISO files.  I have several Linux and Windows ISOs always on hand, for convenience.  Each ISO is in its own directory, for example Ubuntu 12.04 server is in folder linux_isos/Ubuntu/Server/12.04/.  In this particular folder I have the ISO file ubuntu-12.04.5-server-amd64.iso.   (For windows ISOs I have the ISO and a key code file for registrering it after an install)



I set turned my ISO parent directory into a git repository with this .gitignore file.


#Ignore all those dumb .ds_store file
.DS_Store
._*
#Generic files to ignore
*.swp
*.lock
*~
*.out

#not-git files and folders
#in this case just ignore .iso files
*.iso


This will ignore all the .iso files, but capture the key files and rsync files I am going to create in each folder.

Installing git v1.9 on Cygwin and Ubuntu

Posted on Friday, August 8, 2014


In another git tutorial I had to install Cygwin 1.9 on Cygwin and Ubuntu.  I have a feeling other people may just want this small piece of info when googling for it.

This blog post just covers this small subject quickly.  (This assumes you have some version of git already installed)

gitignore and calculating tools

Posted on Wednesday, August 6, 2014


I finally decided to take the plunge, drink the Koolaid, or whatever metaphor fits, and begin using git on some of my personal files.

I ended up learning a lot more about git in the process.  As a result this document may be a little long, if you want to skip ahead and read the summary that may be good enough for most people.

To do this right you need a server that can serve as a remote repository (So you can have off computer storage, if not also offsite).  I covered how to do this in this article http://www.whiteboardcoder.com/2012/08/installing-git-server-on-ubuntu-1204.html

Jenkins and sbt

Posted on Wednesday, January 29, 2014


This guide will go over installing the sbt plugin for Jenkins.  This guide assumes you Jenkins already installed and running and has the git plugin. 

If you do not have Jenkins installed I wrote up a guide to show you how at http://www.whiteboardcoder.com/2014/01/install-jenkins-ubuntu.html

If you do not have the git plugin for Jenkins installed I wrote up a guide on that too at http://www.whiteboardcoder.com/2014/01/git-with-jenkins.html


git with jenkins

Posted on Monday, January 27, 2014


This guide will go over installing the git plugin for Jenkins.  Jenkins already installed and running (Very basic setup).

Install git via apt-git


First git needs to be installed on the Ubuntu machine


> sudo apt-get install git


github with jenkins



This guide will go over installing the git plugin for Jenkins. It assumes you have Jenkins already installed and running (Very basic setup).  If you have not done that yet I wrote a how to guide at http://www.whiteboardcoder.com/2014/01/install-jenkins-ubuntu.html


As a side note there is a github plugin to Jenkins https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin [1]  But I will not be going over that, rather I will just use the basic git plug-in to talk to github


Xcode 5 using a git username email

Posted on Thursday, January 9, 2014


Xcode 5 by default uses the username from OS X when committing in git.   I am not sure what the default is used for the email but it's not correct.  If you run a command to look at the recent logs like.

Xcode 5 using a git remote repository

Posted on Wednesday, January 8, 2014


I recently had a friend who is using Xcode and needed to set up a remote git repository for it.   I am not an Xcode user so bear with me if I miss some of the proper set up of Xcode. 

Here is the set up and instruction I used for him.


Visual Studio 2012 Using a git Repository

Posted on Thursday, April 25, 2013




I have recently been working on a project using C# and .Net.  I decided to go ahead and buy Visual Studio 2012 Professional.  So far I like it but I have not had time yet to set up a proper repository for it.   I was planning on using git, but I figured Microsoft would not support it directly and I would be forced to use git on the command line (which I am fine with).  Well it turns out Visual Studio 2012 does support git.

I found some information on the fact that Visual Studio can use git at this site. http://www.hanselman.com/blog/GitSupportForVisualStudioGitTFSAndVSPutIntoContext.aspx [1]


This document does not go over TFS (Team Foundation Server), although you can use git with TFS.  Also you can use git with  Team Foundation Service https://tfs.visualstudio.com/en-us/, its free for up to 5 users (not sure if it's going to remain that way)

Create git server on AWS cloud

Posted on Wednesday, January 23, 2013



I am new to the git world,  I have been using subversion for many of my past projects, so bear with me if I seem to cover rudimentary git in this document.

The goal of this document is to show you how to use cloud-init with ubuntu 12.10 to easily create a git server in the aws cloud.


Installing Git server on Ubuntu 12.04

Posted on Wednesday, August 15, 2012



Installing Git server on Ubuntu 12.04


I am familiar with using subversion, but my new job calls for using Git so I this is my attempt to set us a Git server on Ubuntu and use it.  First the main site for Git is http://git-scm.com/ [1] 

If you are new to Git, like I am, the Git folks have a wonderful free online book at http://git-scm.com/book [2].   And if you want to get right to it the section on setting up a server is at http://git-scm.com/book/en/Git-on-the-Server-Setting-Up-the-Server
(I took a of information from this guide)

Starting from a fresh install of Ubuntu 10.04 server with openssh
installed.

First create a git user