Skip to content

Instantly share code, notes, and snippets.

@muhammetkole
muhammetkole / git_rebase.md
Created January 15, 2021 10:36 — forked from ravibhure/git_rebase.md
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@muhammetkole
muhammetkole / bash-commands.md
Last active December 29, 2021 13:00 — forked from katronai/bash-commands.md
These are the most useful commands for myself working on Terminal

Bash Commands

  • ls -p
    Puts / at the end of directories while listing

  • cd ..
    Change to the parent directory

  • cd -
    Change to the previous directory

@muhammetkole
muhammetkole / BetterXcodeJumpToCounterpartSwift.org
Created January 7, 2020 12:41 — forked from danielmartin/BetterXcodeJumpToCounterpartSwift.org
Add support for a better Xcode's Jump to Next Counterpart in Swift

If you work on a Swift project that follows the Model-View-ViewModel (MVVM) architecture or similar, you may want to jump to counterpart in Xcode from your view to your model, and then to your view model. (ie. by using Ctrl+Cmd+Up and Ctrl+Cmd+Down).

You can do this in recent versions of Xcode by setting a configuration default.

From a terminal, just type this command and press Enter:

defaults write com.apple.dt.Xcode IDEAdditionalCounterpartSuffixes -array-add "ViewModel" "View"