Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7078929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:36:29+00:00 2026-05-28T06:36:29+00:00

Is it possible to have git commit also add new files and directories? It

  • 0

Is it possible to have git commit also add new files and directories?

It seems a lot of needless typing in the long run to have to type git add . then git commit

(That, and I have a tendency to often forget to call git add . resulting in versions with missing directories and such)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:36:30+00:00Added an answer on May 28, 2026 at 6:36 am

    As long as I am informed right there is no such command (It could be dangerous when you have debug-files containing passwords), but if you want to simulate you could add this alias to your git config:

    git config --global alias.commitx "!git add . && git commit"
    

    Using git commitx will now run git add . followed by git commit, so you can do

    git commitx -m "testing commitx on new unstaged files"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Show the original branch for a commit git version 1.7.4.1 I have
Is it possible for me to 'git commit --amend' 2 commits AFTER I have
Possible Duplicate: How to delete a 'git commit' I am new to git and
Possible Duplicate: Git undo last commit I have a folder structure like this.. ~/git
Is it possible to have 2 git repositories in one directory? I'd think not,
Is it possible to deploy a website using git push ? I have a
It's possible that I'm not really understanding how git works here, but I have
I seem to have run into a case where git doesn't notice inline changes
Possible Duplicate: How can I commit only part of a file in git I
I have made a git commit but I have not pushed. And I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.