Skip to content

Commit c5c5542

Browse files
committed
Change to git root directory before adding files
Changed the working directory to the git root directory so that `git add -A` adds all files.
1 parent 61fcb3c commit c5c5542

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

git-fire

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ new_branch() {
2828

2929
fire() {
3030
git checkout -b "$(new_branch)"
31+
32+
# cd to git root directory
33+
cd $(git rev-parse --show-toplevel)
34+
3135
git add -A
3236

3337
if [ -z "$1" ]; then

0 commit comments

Comments
 (0)