Hacker Newsnew | past | comments | ask | show | jobs | submit | victorbello's commentslogin

I use feature branched for everything, usually named after an issue number. I created a script that allows me to commit whenever I get a task done, not the whole feature, and that script takes care of adding the files, committing them with a message, tags it with the issue number (current branch name), and pushes to remote. That way, every time I save, the changes are saved on the remote GIT repo in case my computer dies or something.

Here's the code in case you wanted to use it:

savework()

{

  if git diff --exit-code --quiet

  then

    echo "There are no changes to save, NONE!";

  else

    echo "Stage everything for commit -------------";

    addit; # an alias for "git add -A ."

    echo "Commit all changes with message $@ --------------";

    commit "$@"; #commit is an alias for "git commit -m"

    echo "Push branch to remote --------------"
    psh; # an alias for git push origin $(git branch | grep "*" | sed "s/* //")

  fi
}

Use it like this: savework "COMMIT MESSAGE HERE"


Thank you, I'm going to modify it to:

saveallwork "commit message" --ignore "somedir/skipme.too"

I usually have just 1 or 2 files I don't want to include in a commit, but thank you again, it will definitely shave a few mins here and there.


That seems like it could generate an excessive amount of commits (or maybe not everyone saves hundreds of times per day).

Just curious -- do you squash commits when merging one of these feature branches?


It looks like a fun game!

Congratulations on following your dream, I wish I had the same opportunity.

I'll give it a try and tell you more later.


Thanks, it's never to late!


Faraday Future | Gardena, CA or Redwood City, CA | full-time and internships

Faraday Future is a California mobility company bringing a tech approach to clean transportation. At FF, we believe that by placing equal emphasis on automotive and technology disciplines, our team of experts is uniquely positioned to take a user-centric, technology-first approach to vehicle design with the ultimate aim of connecting the automotive experience with the rest of your life.

A couple positions not listed on our site, which we are also currently hiring for, is Android Developers and Web Developers, if you've been working with MeteorJS and ReactJS, even better.

https://jobs.lever.co/faradayfuture

We look forward to meeting you!


Interested in internship. No position listed. Where should I apply?


You can send an email to jobs at faradayfuture dot com. We have an internship program that will start soon.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: