Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (120 points)

hi 

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	META-INF/
	classes/
	repository/
	sample-2.0.9-SNAPSHOT-mule-application.jar
	temp/
	test-classes/

the above are untracked files and i want jar file and ignore other file.

basically i am doing is trying to push jar files from jenkins to bitbucket. 

and i facing issue is when i do changes in that particular pom file and push again i am facing this issue. although i tried adding .gitignore file but i am unable to over come this problem.

It will be veryful if you help me with this error 

and code which i wrote to push code

stage('bitbucket deploy') {

        steps {

          script{

             GIT_CREDS = credentials('bitbucket-server-cred')

            sh '''  

                cd /var/lib/jenkins/workspace/bitbucket_deploy/target         

                git init

                git config --global user.name "admin"

                git status

                git remote add origin http://***:***@**.***.**.***:***/scm/or/lla-esb-artifactory.git

                git remote -v

                git pull origin master --allow-unrelated-histories

                git add -f *.jar

                git status

                git commit -a -m "push into bitbucket"

                git push origin master

           '''

          }

Thanks in advance 

related to an answer for: .gitignore is ignored by Git

Please log in or register to answer this question.

Related questions

+1 vote
1 answer
asked Aug 24, 2019 in DevOps and Agile by chandra (29.3k points)
0 votes
1 answer
+1 vote
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94k users

Browse Categories

...