Quantcast
Channel: mgalalm » Git
Browsing latest articles
Browse All 10 View Live

Image may be NSFW.
Clik here to view.

Handy git commands to enhance the productivity

To unstage tracked files (files those added by git add) git reset To add all files and directories in you working directory use inside this directory git add –all or type the path to it git add –all...

View Article



Image may be NSFW.
Clik here to view.

Excluding files form staging in git

Working with the git add command that there’s lots of different ways that you can quickly reference a whole bunch of files. git add –all for example would add all of the files that it can find inside...

View Article

Image may be NSFW.
Clik here to view.

Overwrite the last commit instead of create a new one

You can overwrite the previous commit if it still only in your local copy of the repository. Using the –amend flag allows you to modify a previous commit. Let’s say you just made this commit and then...

View Article

Image may be NSFW.
Clik here to view.

Commit a removed / moved file or directory manually

  If you remove or rename tracked files manually whether form your terminal  using rm  or from you file management in your operating system finder for example in OS or even form your ftp client...

View Article

Image may be NSFW.
Clik here to view.

How to add changes to old commit

To add your changes to the previous (most recent commit or HEAD)  you can just use this command  git commit –amend -C HEAD However suppose you want to commit your last changes to a specific commit not...

View Article


Image may be NSFW.
Clik here to view.

Revert changes manual for Git

It’s important to remember that Git has three different states that a file can be in. You can think of, a file can be in the version that is the most recently committed version of that file, or head....

View Article

Image may be NSFW.
Clik here to view.

Stashing uncommitted changes

If you try and run a git pull –rebase with unstashed changes , you ‘ll get an error message like: Cannot pull with rebase: You have unstaged changes. Please commit or stash them. Another case if you...

View Article

Image may be NSFW.
Clik here to view.

Ceasing retyping username and password for github

Instead of retyping the username and password for github every time you interact  with the remote repository,  you need to use SSH instead of using http , to do so you need first to generate a public...

View Article


Image may be NSFW.
Clik here to view.

ignoring files globally in git

You can define the excluded files form git in a global scope instead of adding it every time to the local .gitignore  file, stuff like .swp files, those ends with ~ , .gitignore files itself  and any...

View Article


Image may be NSFW.
Clik here to view.

Aliases in git

  Git is a bit complicated, and it’s full of all of these different esoteric commands with flags that I can’t even remember the names of, and it gets really complicated to use over time, especially as...

View Article
Browsing latest articles
Browse All 10 View Live




Latest Images