Tag Archives: git

sd vs git commands

Published February 21, 2015 10:16 am

If you ever worked at Microsoft, you would have used the source depot command line tool sd.exe. Prior to tfs, this is the primary source depot tool used within Microsoft including windows team. Although, it used one more layer of top of it to enable branching across multiple source depot servers. Outside Microsoft, you get to use tfs using tf command line or using visual studio integrated UI. git is prevalent at other places.

gitA programmer is interested in code everywhere & hence, getting familiar with git is important. Hence, I just started by skimming the Pro git book & taking github tutorial. Getting comfortable with any tool takes little time and also you learn by mapping your old concepts to the new tools.

Here are my notes as I am going through this::

sd command/conceptgit command/concept
sd is typical source depot with a central repository & local client mapping. There isn't distributed repositories (although it has concept of proxy servers). For most of the commands, source depot server need to be available including branching, merging etc.git comes with local repository & remote repository. This is key high level difference which then translates into differences in the individual commands.
enlistment
- local copy of the files
Working directory
sd client - set server/local path mappings
sd sync - sync local copy
git checkout - update working directory with files from required branch
NA. There is only central repository.git remote - setup mapping with remote repositories.
NA. There is only central repository.git push -- publish changes
git pull -- fetches changes
to/from remote repository.
change list - a set of files that can be committed to server. multiple change lists can be maintained in the enlistment.staging directory.
files need to be staged prior to commit.
sd add -- add files
sd edit -- edit files
to change list
git add - add files
to staging area
sd revert - reverts changes git reset - remove file from staging area
git checkout - reset contents of file to last checked in version
sd delete -- delete file
to change list
git rm - delete file
to stage area
sd submit -- submit change list to servergit commit -- submit changes in staging area to local repository
sd branch -- create a branchgit branch -- create a branch
sd integrate -- to merge changes forward/backward to/from child branches. called forward & reverse integrate.
sd resolve - merge changes
git merge -- merge changes from child branch or remote repository,

* These notes are kind of high level mappings & are meant for me to jump start; get to more details along the way.