git

In that case make sure you only remove the staged version, and add the file to your .gitignore to avoid making the same mistake a second time:
git reset filename # or git remove --cached filename
echo filename >> .gitingore # add it to .gitignore to avoid re-adding it

Taggings:

Remove a file from git without removing it from your file system

If you are not careful during a git add, you may end up adding files that you didn’t want to commit. However, git rm will remove it from both your staging area, as well as your file system, which may not be what is needed. The file should be removed only from Git-repository without removing it from the file system.

Taggings:

Edit commit messages in Github

This article solves the following challenge: 

Edit commit messages in Github.

Typos happen, but luckily in the case of commit messages, it is very easy to fix them:
git commit --amend # start $EDITOR to edit the message
git commit --amend -m "New message" # set the new message directly
But that’s not all git-amend can do for you. Did you forget to add a file? Just add it and amend the previous commit!
git add forgotten_file
git commit --amend
Please keep in mind that --amend actually will create a new commit which replaces the previous one, so don’t use it for modifying commits which already have been pushed to a central repository. An exception to this rule can be made if you are absolutely sure that no other developer has already checked out the previous version and based their own work on it, in which case a forced push (git push --force) may still be ok. The --force option is necessary here since the tree’s history was locally modified which means the push will be rejected by the remote server since no fast-forward merge is possible.

Evaluate complexity of present statement:

Select ratingCancelGuessingPassing knowledgeKnowledgeableExpert

Your rating: None Average: 4 (1 vote)

Taggings:

Using Git DVCS (distributed version control system) and GitHub to effectively collaborate on an open-source software project

While collaboratively working together on an open-source project (which aims to provide a fresh web app framework in this concrete case) and moves at a fast pace it conseqeuntly turned out that using the standard approach of centralized VCS for it soon hit its limits. Therefore, we jointly decided in the community to switch to a decentralized one, namely Git. This DVCS was originally developed by Linus Torvalds for managing the development of the Linux kernel. Its main concept basically is that everybody has his/her own complete "clone" of the code repository. So there isn't a single centralized code repository as in the structure/architecture of Subversion, but a number of decentralized ones. As a consequence Git was also developed to have very powerful and convenient capabilities of merging branches of code repository clones. This feature which is also one of Git's biggest strengths shall be described and explained in more detail. Git's basic usage is mainly command line based and can especially in the beginning pose quite a steep learning curve on new users. So it should be given a short introduction to Git's main concepts and concrete usages as well. Another very nice companion to Git is the Git code repositories hosting site/service GitHub (github.com) which can make using Git simpler and furthermore improve collaborative development processes and tasks of a programming/development project. This shall also be presented and explained.

Pages

Subscribe to git