Skip to content

Instantly share code, notes, and snippets.

View kaankaraoglu's full-sized avatar
🤘

Kaan Karaoğlu kaankaraoglu

🤘
View GitHub Profile

After reading Why I'm Frequently Absent from Open Source by James Long and listening the corresponding The Changelog episode, I dwelt on the idea and believe that open source maintainers...

  • ... should never be ashamed if they don't have time for a project.
  • ... should be honest with themselves and open with their users so that everybody can be on the same page
  • ... are people and they have at one time or another responsibilities or hardships that they need to attend to which reasonably take them away from a project
  • ... may also reasonbly decide that they don't like the direction of a project or that they would like to explore other things and may leave a project permanently.

Along this line of thinking I've created a set of descriptions for different levels at which a project might be maintained. A maintainer can use these to announce to their users the current ability that they have to dedicate to a pr

git-fetch-all-local-branches

while read -r line
do
    git checkout "$line" && git fetch;
done < <(git branch | grep -v -- '-->')
@kaankaraoglu
kaankaraoglu / git-squash.md
Last active August 19, 2019 13:30
git-squash

git-squash

Make sure your branch is up to date with the master branch.

  • Run git rebase -i master. You should see a list of commits, each commit starting with the word "pick".
  • Make sure the first commit says "pick" and change the rest from "pick" to "squash". This will squash each commit into the previous commit, which will continue until every commit is squashed into the first commit.
  • Save and close the editor. It will give you the opportunity to change the commit message.
  • Save and close the editor again.
  • Then you have to force push the final, squashed commit: git push -f.
@kaankaraoglu
kaankaraoglu / .htaccess
Created April 17, 2019 11:17 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/