Git やっと理解した
Posted on May 23, 2019
Git 自体は触ったことはあったんですが、これまでは自分しかさわらないレポジトリばかり。基本的には git pull と git clone と git push ぐらいしか使うことはなかったんですが、今回、仕事で他のメンバーとレポジトリを共同で操作することになり、Git を勉強し直しました。
今回は、Udemy のこちらのコースを受講。合計6時間分しかビデオはなく、土日で十分理解できそう、ってことでこちらを選びました。
で、実際、週末で十分理解でき、そのまま実践投入。無事 Git デビュー出来ました。これで社内のエンジニアに迷惑かけなくても済む!
仕事でよく使うコマンドはこんなところかな。
| Command | Description |
|---|---|
git status | Show the status of the repository |
git branch -d <branch> | Delete the branch |
git chechout <branch> | Switch to the branch |
git checkout -b <branch> | Make a branch and switch to it |
git merge <branch> | Merge the branch into the current one--no-ff: Merge a branch without fast-forwarding |
git rebase <branch> | Establish a new base level by merging a branch into the current one |
git stash | Stash files in WIP-u: + non-tracking filessave "<message>": add a message |
git stash list | List stashed files |
git stash pop | Apply and drop stashed files |
ヘタレなので、git push とか git add とかは、いまだに GitKraken 使ってポチポチやってますが、それ以外は、Bash/Powershell で使えるようになりました。
つうことで、Git 勉強しないといけない方、6時間くらいあればなんとかなります!
P.S.
共同で触っているのは、こちらのウェブサイト。Hugo で作ってます。
comments powered by Disqus