I received .bundle file in my gmail. I was told that it was a git bundle file. I tried to open it in sublime and I got a bunch of what seemed to have looked like hex values. It is suppose to be instructions for a code challenge. I have a mac. Any help would be very appreciated!
git-clean - Remove untracked files from the working tree
git clean [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <path>…
Cleans the working tree by recursively removing files that are not under version control, starting from the current directory.
Normally, only files unknown to Git are removed, but if the
-xoption is specified, ignored files are also removed. This can, for example, be useful to remove all build products.
If any optional
<path>...arguments are given, only those paths are affected.
Step 1 is to show what will be deleted by using the
# Print out the list of files and directories which will be removed (dry run) git clean -n -d
Clean Step - beware: this will delete files:
# Delete the files from the repository git clean -f
- To remove directories, run
git clean -f -dor
git clean -fd
- To remove ignored files, run
git clean -f -Xor
git clean -fX
- To remove ignored and non-ignored files, run
git clean -f -xor
git clean -fx
Note the case difference on the
X for the two latter commands.
clean.requireForce is set to "true" (the default) in your configuration, one needs to specify
-f otherwise nothing will actually happen.
Again see the
git-clean docs for more information.
If the Git configuration variable clean.requireForce is not set to false, git clean will refuse to run unless given
Don’t use the standard ignore rules read from .gitignore (per directory) and
$GIT_DIR/info/exclude, but do still use the ignore rules given with
-eoptions. This allows removing all untracked files, including build products. This can be used (possibly in conjunction with git reset) to create a pristine working directory to test a clean build.
Remove only files ignored by Git. This may be useful to rebuild everything from scratch, but keep manually created files.
Don’t actually remove anything, just show what would be done.
Remove untracked directories in addition to untracked files. If an untracked directory is managed by a different Git repository, it is not removed by default. Use
-foption twice if you really want to remove such a directory.
Amending the most recent commit message
git commit --amend
will open your editor, allowing you to change the commit message of the most recent commit. Additionally, you can set the commit message directly in the command line with:
git commit --amend -m "New commit message"
…however, this can make multi-line commit messages or small corrections more cumbersome to enter.
Make sure you don't have any working copy changes staged before doing this or they will get committed too. (Unstaged changes will not get committed.)
Changing the message of a commit that you've already pushed to your remote branch
If you've already pushed your commit up to your remote branch, then - after amending your commit locally (as described above) - you'll also need to force push the commit with:
git push <remote> <branch> --force # Or git push <remote> <branch> -f
Warning: force-pushing will overwrite the remote branch with the state of your local one. If there are commits on the remote branch that you don't have in your local branch, you will lose those commits.
Warning: be cautious about amending commits that you have already shared with other people. Amending commits essentially rewrites them to have different SHA IDs, which poses a problem if other people have copies of the old commit that you've rewritten. Anyone who has a copy of the old commit will need to synchronize their work with your newly re-written commit, which can sometimes be difficult, so make sure you coordinate with others when attempting to rewrite shared commit history, or just avoid rewriting shared commits altogether.
Perform an interactive rebase
Another option is to use interactive rebase. This allows you to edit any message you want to update even if it's not the latest message.
In order to do a Git squash, follow these steps:
// n is the number of commits up to the last commit you want to be able to edit git rebase -i HEAD~n
Once you squash your commits - choose the
e/r for editing the message:
Important note about interactive rebase
When you use
git rebase -i HEAD~n there can be more than n commits. Git will "collect" all the commits in the last n commits, and if there was a merge somewhere in between that range you will see all the commits as well, so the outcome will be n + .
If you have to do it for more than a single branch and you might face conflicts when amending the content, set up
git rerere and let Git resolve those conflicts automatically for you.
- Git – How to reset or revert a file to a specific revision
- Git – How to undo ‘git add’ before commit
- Git – How to undo the most recent local commits in Git
- Git: How to force “git pull” to overwrite local files
- Git – How to make Git “forget” about a file that was tracked, but is now in .gitignore
- Git – How to check out a remote Git branch
- Git – How to delete a Git branch locally and remotely
- Git – How to rename a local Git branch