Ever want to checkout a new git branch from another branch without setting up tracking? Here is the longhand way: git checkout old-branch git branch new-branch git checkout new-branch But there is a quicker way: git checkout -b new-branch old-branch … which does the same thing, albiet in one command.
Posts Tagged ‘version control’
git checkout -b –no-track
Posted in Open Source, Software, Technique, tagged DVCS, git, git checkout, software configuration management, version control on July 2, 2011 | Leave a Comment »
How to checkout and track a remote git branch
Posted in Engineering, Linux, Open Source, Software, Technique, tagged git, git branch, version control on July 9, 2010 | Leave a Comment »
One of those really handy things to remember… When git “tracks” a branch, it basically sets up an entry in .git/config which tells git what to do with push and pull. For example: I had a remote branch called Task/Round3.3. I wanted to work on it locally, but have push and pull work right. So [...]
git add -u
Posted in Engineering, Software, Technique, tagged git, git add, scm, version control on May 16, 2010 | Leave a Comment »
Here is a nice little tidbit I ran across some time ago… Ever delete a bunch of files from a git working copy, and then had to go in and tell git that you meant to delete them? For example: [jason@dc40 AppStruct]$ git status # On branch master # Changed but not updated: # (use [...]
git scm tip
Posted in Engineering, Perspective, Technique, tagged git, scm, tip, version control on February 20, 2010 | Leave a Comment »
You may be aware of git add . But did you know this: adds all the files. Use with care (only after git status, for example). adds and deletes all KNOWN files. This is great if you added and removed or renamed files.