How To Clone An Older GIT Commit

A git repository contains the all history at all time. So when you are cloning a repository, you are cloning it with its full history, and then, you can make a branch from whatever commit you want:


git checkout -b aNewBranch SHA1

Example:

Derek@DELL8400 ~/workspace3/EDT-Tweaks2 (sensation)
$ git checkout -b Aug29 180a318445b04c1912e29fcbfc547849fe2dc5c5
Switched to a new branch ‘Aug29’

How To Determine What Files Have Changed Between Two Subversion Revisions

Lets say that you last deployed your application from repository version #85.  After a few weeks of development, the repository is now up to revision #178.  The team has decided that the code is stable and you are ready to package up all new/changed files to transfer to the host server, client, etc.

  1. Using TortoiseSVN, right-click on your working folder and select “Show Log” from the TortoiseSVN menu.
  2. Click the revision that was last published (#85 in this example)
  3. Ctrl+Click the HEAD revision (or whatever revision you want to release ie #178) so that both the old and the new revisions are highlighted.
  4. Right-click on either of the highlighted revisions and select “Compare revisions.”  This will open a dialog window that lists all new/modified files.
  5. Select all files from this list (Ctrl+a) then right-click on the highlighted files and select “Export selection to…”

Original Source

How to Set Up SmartGit With GitHub

  1. Create a Github.com account
  2. Download GIT For Windows (msysgit) –>  http://code.google.com/p/msysgit/
  3. Install msysgit choosing the following options:  Use git bash only [default].   Checkout Style:   Choose:  “check out as is commit as is”
  4. Launch GIT GUI
  5. In GIT GUI click menuitem:  Help | Show SSH Key | Click Generate Key and enter a passphrase
  6. Confirm new RSA keys were created in C:\Users\YourUserName\.ssh
  7. Open C:\Users\YourUserName\.ssh\id_rsa.pub with Notepad++ and copy to clipboard.
  8. Login to Github and navigate to your Account Settings | SSH public keys and Create a new key. Paste the contents of  your RSA public key you just copied.  Name it anything you want
  9. Download and Install SmartGIT –> http://www.syntevo.com/smartgit/index.html
  10. Launch SmartGIT.  It should automatically find your rsa keys.
  11. Clone a project Project | Clone | Remote URL:  git@github.com:myn/warm-z-twopointtwo-base.git  (or any other githum repo)
  12. If it asks for a password, use your github.com password.

Adding Controls And Referencing Them In Shared Development Environments

When you install a control (example MS AJAX Control toolkit), the path reference it adds defaults to where you installed the control (dll) which is typically outside of the project.

When you’re dealing with a shared development environment and source control. Add the DLL to the project (perhaps in \Lib) and then add a reference (In project / References) to that DLL now in the project.

That way all parties will be able to make use the control

Deleted Files Showing Up As Newly Added Files In Source Safe 6.0

When a particular person on your development team deletes a file managed under SourceSafe 6, the next time anyone else on that team Gets Latest Version those deleted files will show up in your Pending Checkins window as a “Newly added file” even though they are not.

To get around this, go into the Pending Checkins window and Check In all files.  The files that are truely deleted you will get prompted:

“A deleted copy of this FileNameHere.aspx file already exists in this project. Do you want to recover the existing file?”

A deleted copy of this FileNameHere.aspx file already exists in this project.  Do you want to recover the existing file?

Hit “Cancel” on these.  These are the files that have been deleted.

After checking in all files goto the Pending Checkins window and the remaining list of files still showing are the ones that have been deleted.

Pending Checkins only showing deleted files

Now if there was only a really nice easy way to mass delete from the Pending Checkins window!

SourceSafe v6.0 Process Notes

Initial Pull

  1. Right click on project | “Create Working Folder” (Which folder? %my docs\vs2008… or c:\inetpub\wwwroot ?
  2. Right click on project | “Get Latest Version” (choosing “recursive” and “Build tree” [only first time ])
  3. Load VS.net 2008 and goto Tools | Options confirming source control is set to “Microsoft Visual SourceSafe”
  4. Open local sln file pulled from source safe

Checking Out

  • Verify within Visual Studio –> Tools | Option | Source Control | Environment : if “On Save” and “On Edit” specify “Check Out Automatically” than code will automatically be checked out as you edit them

Checking In

  • View | Pending Checkings shows your pending check-ins can also check in here
  • Can also check in code by right clicking on file within solution explorer
  • Before checking in you’ll want to get latest code to ensure the build doesn’t break

Getting Latest Code

  • Within VS.NET 2008, You can either select the top level solution or the individual files. Right click and select the context menu “Get Latest Version”
  • For files you have checked out it will prompt you for the action you wish to perform, “Replace” or “Merge”
  • If you choose Merge, Source Safe will attempt to automerge. If it is unable to merge automatically it will prompt you to pick the changes to merge.

Performing Diffs from checked out code to code stored under Source Safe

  • Within VS.NET, right click on a file within solution explorer and click “View History”. Once you have history you can compare files.
  • if you wnat to compare yours to what is the latest in SourceSafe, you can right click the file and choose “compare”