Geeks With Blogs

News Please visit me at my new blog!!

profile for Aligned at Stack Overflow, Q&A for professional and enthusiast programmers
"free in Christ Jesus from the law of sin and death." Romans 8:2 (ESV) Check out the Falling Plates video on YouTube.
more about the Gospel
And then listen to Francis Chan speaking at LifeLight in SD.



Programming and Learning from SD

I shared some information at a Lunch and Learn along with a demo and now I’m sharing it with you.


"branching as a tool vs branching as a strategy" ~ Scott
a branch is a playground

new task = new branch, use Pull Requests to get the code into master
- or allow direct check-in to master (for 1 or 2 person teams?)
checkout a branch with git checkout myBranch


from VS UI
VS Code UI


#taskNumber in comment will link up to a TFS task.

Pull Request
- gated
- code reviews
 

Command Line
get latest = git pull
check in = git add -A (stage), commit -m "commit message" (repeat), git push
git checkout is switching the branch

Rebasing
git checkout master
git pull

git checkout myBranch
git rebase master
git push --force // VS doesn't do this

git ..master karma.conf.js (compare your branched code against master)

rebase or merge? http://stackoverflow.com/questions/804115/when-do-you-use-git-rebase-instead-of-git-merge

VIM
http://bullium.com/support/vim.html
get away from VIM:
https://help.github.com/articles/associating-text-editors-with-git/
http://stackoverflow.com/questions/30024353/how-to-use-visual-studio-code-as-default-editor-for-git   

Links
https://services.github.com/kit/downloads/github-git-cheat-sheet.pdf
http://learngitbranching.js.org/
https://www.codeschool.com/courses/try-git
https://www.visualstudio.com/en-us/docs/git/gitquickstart
https://git-scm.com/book/en/v2
https://www.pluralsight.com/courses/git-fundamentals
https://blogs.msdn.microsoft.com/luisdem/2016/10/18/net-core-git-vsts-vscode/

 

XKCD is relevant here: https://imgs.xkcd.com/comics/git.png

Posted on Tuesday, November 8, 2016 1:29 PM | Back to top


Comments on this post: Some Git help

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Aligned | Powered by: GeeksWithBlogs.net