Help - not able to import NeedIt from git

Abe7
Kilo Explorer

Reading Introduction to Client Side Scripting. https://developer.servicenow.com/app.do#!/lp/servicenow_application_developer/app_store_learnv2_scripting_newyork_introduction_to_client_side_scripting?v=newyork

When I try to import NeedIt from git i get this error:

100%
The application has been changed since it was last imported or exported. Either export the changes or elect to lose unsaved work.
How can I get past this?
 
1 ACCEPTED SOLUTION

Abe,

If you want to remove an application, better go to "System definition > My Company Applications". Choose the application needit, and in the next window, click on the upper right button "Delete".

Regarding the problem with git, try to fork the application at git (as i told you, fork, clone or follow the steps provided by the needit developers):

    Fork a repo

To fork the repo you will need your own account at git.

Regards,

 

View solution in original post

4 REPLIES 4

lmseco
Mega Expert

You may need to fork or clone the repository to work with it.

Anyway, more information here:

https://github.com/ServiceNow/devtraining-needit-newyork

"If you find yourself unable to import your repository due to the presence of files edited outside an instance of ServiceNow, merge commits that mix files from different revisions, or other data that does not match the checksum, you may recover using either of the following techniques:

  • Remove the problem commits:

    1. Clone your repository to a personal computer with the git command line tools installed and open a git command prompt in the repository root
    2. Run git log and take note of the SHA1s of the problem commits
    3. Build revert commits using git revert SHA1 repeatedly, working backward in time, for each commit that introduced changes not generated by a ServiceNow instance
    4. Run git push
  • Overwrite the problem code snapshot with a known good one:

    1. Clone your repository to a personal computer with the git command line tools installed and open a git command prompt in the repository root,
    2. Locate a known good code snapshot and record its SHA1. For this step, git log can be useful.
    3. Run git reset --hard SHA1 to a commit that was generated by a ServiceNow instance
    4. Run git reset HEAD{1}
    5. Run git add -A
    6. Run git commit
    7. Run git push

"

Regards,

Luis M.

Abe7
Kilo Explorer

I am not much familiar with git. But I tried following the instructions and was able to get any further. 
Is there someway to just reset everything on Studio?

When I open Studio I get a form that has 2 buttons, Create Application and Import From Source Contro, and bellow it, a list of Applications. One of he Applications it lists is NeedIt. I have removed NeedIt from Tables etc and no where else can I find a reference to NeedIt besides for here. How do I remove it from appearing here? 

Abe,

If you want to remove an application, better go to "System definition > My Company Applications". Choose the application needit, and in the next window, click on the upper right button "Delete".

Regarding the problem with git, try to fork the application at git (as i told you, fork, clone or follow the steps provided by the needit developers):

    Fork a repo

To fork the repo you will need your own account at git.

Regards,

 

Raj85
Kilo Contributor

Thanks this worked,

But a small change I think the module "My Company Application" is moved now. I was not able to find it under application "System definition" instead found it under "System Application". and was able to delete it and import once again from Git.

 

Thank you @lmseco