DEV Community

Ben Halpern
Ben Halpern

Posted on

A day in the life for you and git...

Git is a technology which can be endlessly explained, but sometime demonstrations are best.

What does a typical day look like for you and your relationship with git?

Latest comments (41)

Collapse
 
heshamaboelmagd profile image
Hesham Abo El-Magd

git rebase

Collapse
 
xanderyzwich profile image
Corey McCarty

start the day by doing checkout of develop branch and pulling any changes. Next I'll checkout 'mine' branch and merge develop onto it before getting to work. Commits take place when I complete a unit of work or need to pull changes from somebody else. I've been using broken commits lately and amending them with follow up to fix the issue. After work is complete then I move back to develop and pull before merging my work onto develop and pushing it up to remote.

Note: I tend to trust IntelliJ with my adding and merging.

Collapse
 
imad profile image
imad

oh-my-zsh aliases make it easy for me: gcb, gaa, gcmsg, gp

Collapse
 
scrabill profile image
Shannon Crabill

In the evenings I like to relax by using git clone on a fresh Flatiron coursework repo.

Collapse
 
thebouv profile image
Anthony Bouvier

GitHub Flow for branching.
Jenkins builds most stuff (migrating everything now) and handles deploys.
Peer review PRs or I step in and specifically code review "architected" things.

Collapse
 
murat profile image
Murat Bastas
git checkout -b feature/blabla # alias gco -b
git add . # alias  ga .
git commit -m "message" # alias gc -m
git push -u origin feature/blabla # alias gp

and someone merges my branch to master. I'm doing:

git checkout master alias gcom
git fetch --all --prune # alias gfap
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d # alias gdmb
Collapse
 
rhymes profile image
rhymes

I mostly pull from master, checkout a feature branch which could be brand new or ongoing, I push to its origin and rebase it from master if needed.

Before pushing I obviously have to check the diffs, then add things to the staging area and if everything is okay I commit with a message.

Seldom I revert or undo some changes or navigate through the logs.

I also prune local and remote branches regularly.

Finally at the end of the week I take a look at the logs to refresh my memory about what has happened.

This is my flow on DEV's code.

Collapse
 
aaron_powell profile image
Aaron Powell

Git Error: Check Git Log 😂😂😂

Collapse
 
martyhimmel profile image
Martin Himmel

When starting a change/set of changes:

git checkout master
git checkout -b some_feature

Then, it's typically a cycle of:

git add ./
git commit -m "Did some stuff"
git push

Once it's ready to merge, I create a PR on GitHub to merge with master.

After the merge:

git checkout master
git pull
git branch -d some_feature

Repeat until the end of time. 😄

Collapse
 
bobwalsh47hats profile image
Bob Walsh

It’s cool seeing how all the developers are using git.

Collapse
 
timrodz profile image
Juan Alejandro Morais

I stick to the mantra of commit small, often. If anything goes wrong, I can easily revert specific changes!

Besides that, I embrace Git Flow and the basic commands including rebase!

Collapse
 
joel profile image
Joel Krause

I do this too. Whenever I get to a small “milestone” I push my changes in case I need to go back 👌🏼

Collapse
 
sinewalker profile image
Mike Lockhart • Edited

ohshitgit is a browser keyword and shell function to open that page, plus I have a git alias for "fuck-this-noise" which nukes and re-clones the current repo...

Collapse
 
highcenburg profile image
Vicente G. Reyes

git status
git add
git commit -am
git checkout -b new-feature
git push
git pull from the master branfh if I merge my own pull request on GitHub
git merge if therr are conflicts on my merge 😀

Collapse
 
jessekphillips profile image
Jesse Phillips • Edited

git gui
git fixup
gitk
git rebase -i
git rebase -i

I actually spend a lot of time looking at other's history. Code review, tracking down the cause of a bug.

From that I do spend a lot of time organizing my changes so other's can review and we have good records of why things are changing (better records).

Collapse
 
shubhambattoo profile image
Shubham Battoo

The basic, add commit push, and the rare checkout. A lot of merge. Very less revert.